KNACSS/gulpfile.js

54 lines
1.4 KiB
JavaScript
Raw Normal View History

// Requires
var gulp = require('gulp');
// Include plugins
2016-05-16 15:45:14 +02:00
var sass = require('gulp-sass');
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 () {
2016-05-16 15:45:14 +02:00
return gulp.src('./sass/knacss.scss')
2017-02-06 23:16:28 +01:00
.pipe(sass({
outputStyle: 'expanded' // CSS non minifiée plus lisible ('}' à la ligne)
}))
2017-08-09 15:27:57 +02:00
.pipe(autoprefixer({ grid: true }))
.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() {
2017-08-28 17:10:31 +02:00
return gulp.src('./sass/components/_grillade.scss')
2015-12-24 11:16:13 +01:00
.pipe(gulp.dest('./css/'))
2016-05-16 15:45:14 +02:00
.pipe(sass())
2017-08-09 15:27:57 +02:00
.pipe(autoprefixer({ grid: true }))
2015-12-24 09:04:43 +01:00
.pipe(minifycss())
.pipe(gulp.dest('./css/'));
});
gulp.task('grillade-v6', function() {
2017-08-28 17:10:31 +02:00
return gulp.src('./sass/components/_grillade-v6.scss')
.pipe(gulp.dest('./css/'))
.pipe(sass())
.pipe(autoprefixer())
.pipe(minifycss())
.pipe(gulp.dest('./css/'));
});
// Watcher
gulp.task('watch', function() {
2016-05-16 15:45:14 +02:00
gulp.watch(['./sass/*.scss'], ['css']);
});
2015-12-24 11:16:13 +01:00
2015-07-02 09:31:17 +02:00
gulp.task('default', ['css']);