KNACSS/gulpfile.js

44 lines
1.1 KiB
JavaScript
Raw Normal View History

// Requires
var gulp = require('gulp');
// Include plugins
var less = require('gulp-less');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var minifycss = require('gulp-minify-css');
2015-07-08 09:53:24 +02:00
// var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
2015-06-26 14:34:58 +02:00
// tâche CSS = compile vers knacss.css et knacss-unminified.css
gulp.task('css', function () {
return gulp.src('./less/knacss.less')
.pipe(less())
.pipe(autoprefixer())
.pipe(rename('knacss-unminified.css'))
.pipe(gulp.dest('./css/'))
.pipe(rename('knacss.css'))
2015-07-08 09:53:24 +02:00
//.pipe(sourcemaps.init())
2015-07-02 09:31:17 +02:00
.pipe(minifycss())
2015-07-08 09:53:24 +02:00
//.pipe(sourcemaps.write('.', {includeContent: false}))
.pipe(gulp.dest('./css/'));
});
gulp.task('grillade', function() {
2015-12-24 09:04:43 +01:00
return gulp.src(['./less/_00-config.less', './less/_03-grids.less'])
.pipe(concat('grillade.less'))
2015-12-24 11:16:13 +01:00
.pipe(gulp.dest('./css/'))
2015-12-24 09:04:43 +01:00
.pipe(less())
.pipe(autoprefixer())
.pipe(minifycss())
.pipe(gulp.dest('./css/'));
});
// Watcher
gulp.task('watch', function() {
2015-06-26 14:34:58 +02:00
gulp.watch(['./less/*.less'], ['css']);
});
2015-12-24 11:16:13 +01:00
2015-07-02 09:31:17 +02:00
gulp.task('default', ['css']);