update gulpfile to make SASS default
This commit is contained in:
parent
1cd2fada7e
commit
ee4604de57
1100
css/agency.css
1100
css/agency.css
File diff suppressed because it is too large
Load Diff
2
css/agency.min.css
vendored
2
css/agency.min.css
vendored
File diff suppressed because one or more lines are too long
27
gulpfile.js
27
gulpfile.js
@ -17,10 +17,10 @@ var banner = ['/*!\n',
|
||||
''
|
||||
].join('');
|
||||
|
||||
// Compile LESS files from /less into /css
|
||||
gulp.task('less', function() {
|
||||
return gulp.src('less/agency.less')
|
||||
.pipe(less())
|
||||
// Compiles SCSS files from /scss into /css
|
||||
gulp.task('sass', function() {
|
||||
return gulp.src('scss/agency.scss')
|
||||
.pipe(sass())
|
||||
.pipe(header(banner, { pkg: pkg }))
|
||||
.pipe(gulp.dest('css'))
|
||||
.pipe(browserSync.reload({
|
||||
@ -29,7 +29,7 @@ gulp.task('less', function() {
|
||||
});
|
||||
|
||||
// Minify compiled CSS
|
||||
gulp.task('minify-css', ['less'], function() {
|
||||
gulp.task('minify-css', ['sass'], function() {
|
||||
return gulp.src('css/agency.css')
|
||||
.pipe(cleanCSS({ compatibility: 'ie8' }))
|
||||
.pipe(rename({ suffix: '.min' }))
|
||||
@ -74,7 +74,7 @@ gulp.task('copy', function() {
|
||||
})
|
||||
|
||||
// Run everything
|
||||
gulp.task('default', ['less', 'minify-css', 'minify-js', 'copy']);
|
||||
gulp.task('default', ['sass', 'minify-css', 'minify-js', 'copy']);
|
||||
|
||||
// Configure the browserSync task
|
||||
gulp.task('browserSync', function() {
|
||||
@ -86,8 +86,8 @@ gulp.task('browserSync', function() {
|
||||
})
|
||||
|
||||
// Dev task with browserSync
|
||||
gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function() {
|
||||
gulp.watch('less/*.less', ['less']);
|
||||
gulp.task('dev', ['browserSync', 'sass', 'minify-css', 'minify-js'], function() {
|
||||
gulp.watch('scss/*.scss', ['sass']);
|
||||
gulp.watch('css/*.css', ['minify-css']);
|
||||
gulp.watch('js/*.js', ['minify-js']);
|
||||
// Reloads the browser whenever HTML or JS files change
|
||||
@ -95,14 +95,13 @@ gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function()
|
||||
gulp.watch('js/**/*.js', browserSync.reload);
|
||||
});
|
||||
|
||||
// Compiles SCSS files from /scss into /css
|
||||
// NOTE: This theme uses LESS by default. To swtich to SCSS you will need to update this gulpfile by changing the 'less' tasks to run 'sass'!
|
||||
gulp.task('sass', function() {
|
||||
return gulp.src('scss/agency.scss')
|
||||
.pipe(sass())
|
||||
// OPTIONAL: LESS task if you prefer to use LESS over SASS
|
||||
gulp.task('less', function() {
|
||||
return gulp.src('less/agency.less')
|
||||
.pipe(less())
|
||||
.pipe(header(banner, { pkg: pkg }))
|
||||
.pipe(gulp.dest('css'))
|
||||
.pipe(browserSync.reload({
|
||||
stream: true
|
||||
}))
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user