2015-04-14 10:04:17 +02:00
|
|
|
// Requires
|
|
|
|
var gulp = require('gulp');
|
|
|
|
|
|
|
|
// Include plugins
|
2016-05-16 15:45:14 +02:00
|
|
|
var sass = require('gulp-sass');
|
2015-04-14 10:04:17 +02:00
|
|
|
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');
|
2015-04-14 10:04:17 +02:00
|
|
|
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 () {
|
2016-05-16 15:45:14 +02:00
|
|
|
return gulp.src('./sass/knacss.scss')
|
|
|
|
.pipe(sass())
|
2015-04-14 10:04:17 +02:00
|
|
|
.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}))
|
2015-04-14 10:04:17 +02:00
|
|
|
.pipe(gulp.dest('./css/'));
|
|
|
|
});
|
|
|
|
|
2016-02-12 16:23:20 +01:00
|
|
|
gulp.task('grillade', function() {
|
2016-09-21 11:05:00 +02:00
|
|
|
return gulp.src(['./sass/_config/_breakpoints.scss', './sass/grids/_grillade.scss'])
|
2016-05-16 15:45:14 +02:00
|
|
|
.pipe(concat('grillade.scss'))
|
2015-12-24 11:16:13 +01:00
|
|
|
.pipe(gulp.dest('./css/'))
|
2016-05-16 15:45:14 +02:00
|
|
|
.pipe(sass())
|
2015-12-24 09:04:43 +01:00
|
|
|
.pipe(autoprefixer())
|
|
|
|
.pipe(minifycss())
|
|
|
|
.pipe(gulp.dest('./css/'));
|
|
|
|
});
|
|
|
|
|
2015-04-14 10:04:17 +02:00
|
|
|
// Watcher
|
|
|
|
gulp.task('watch', function() {
|
2016-05-16 15:45:14 +02:00
|
|
|
gulp.watch(['./sass/*.scss'], ['css']);
|
2015-04-14 10:04:17 +02:00
|
|
|
});
|
|
|
|
|
2015-12-24 11:16:13 +01:00
|
|
|
|
2015-07-02 09:31:17 +02:00
|
|
|
gulp.task('default', ['css']);
|