modifs gulpfile.js
This commit is contained in:
parent
1722227172
commit
374f502f97
1 changed files with 4 additions and 9 deletions
13
gulpfile.js
13
gulpfile.js
|
@ -9,13 +9,9 @@ var minifycss = require('gulp-minify-css');
|
||||||
var sourcemaps = require('gulp-sourcemaps');
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var autoprefixer = require('gulp-autoprefixer');
|
var autoprefixer = require('gulp-autoprefixer');
|
||||||
|
|
||||||
// Common tasks
|
|
||||||
gulp.task('styles', ['styles-less']);
|
|
||||||
gulp.task('doallthethings', ['styles-less']);
|
|
||||||
|
|
||||||
|
// tâche CSS = compile vers knacss.css et knacss-unminified.css
|
||||||
// Styles LESS
|
gulp.task('css', function () {
|
||||||
gulp.task('styles-less', function () {
|
|
||||||
return gulp.src('./less/knacss.less')
|
return gulp.src('./less/knacss.less')
|
||||||
.pipe(less())
|
.pipe(less())
|
||||||
.pipe(autoprefixer())
|
.pipe(autoprefixer())
|
||||||
|
@ -26,12 +22,11 @@ gulp.task('styles-less', function () {
|
||||||
.pipe(minifycss({keepBreaks:false,keepSpecialComments:0}))
|
.pipe(minifycss({keepBreaks:false,keepSpecialComments:0}))
|
||||||
.pipe(sourcemaps.write('.', {includeContent: false}))
|
.pipe(sourcemaps.write('.', {includeContent: false}))
|
||||||
.pipe(gulp.dest('./css/'));
|
.pipe(gulp.dest('./css/'));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Watcher
|
// Watcher
|
||||||
gulp.task('watch', function() {
|
gulp.task('watch', function() {
|
||||||
gulp.watch(['./less/*.less'], ['styles-less']);
|
gulp.watch(['./less/*.less'], ['css']);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('default', ['doallthethings']);
|
gulp.task('default', ['css']);
|
Loading…
Reference in a new issue