dcf44e2f24
# Conflicts: # .sass-lint.yml # README.md # bower.json # changelog.md # css/grillade-flex.css # css/grillade-grid.css # css/knacss-unminified.css # css/knacss.css # package-lock.json # package.json # sass/abstracts/_mixins.scss # sass/abstracts/_variables.scss # sass/base/_responsive.scss # sass/base/_utilities.scss # sass/base/_wordpress.scss # sass/base/grillade-flex.scss # sass/base/grillade-grid.scss # sass/components/_alerts.scss # sass/components/_arrows.scss # sass/components/_badges.scss # sass/components/_buttons.scss # sass/components/_forms.scss # sass/components/_media.scss # sass/components/_skip-links.scss # sass/components/_tables.scss # sass/components/_tabs.scss # sass/components/_tags.scss # sass/knacss.scss # yarn.lock
56 lines
1.5 KiB
JavaScript
Executable file
56 lines
1.5 KiB
JavaScript
Executable file
const gulp = require('gulp');
|
|
var sass = require('gulp-sass');
|
|
var postcss = require('gulp-postcss');
|
|
var CombineMQ = require('postcss-combine-media-query');
|
|
var autoprefixer = require('autoprefixer');
|
|
var CSSnano = require('cssnano');
|
|
var rename = require('gulp-rename');
|
|
|
|
gulp.task('css:full', () => {
|
|
return gulp.src('sass/knacss.scss')
|
|
.pipe(sass(
|
|
{
|
|
outputStyle: 'expanded'
|
|
}))
|
|
.pipe(
|
|
postcss([
|
|
autoprefixer, // ajoute les préfixes vendeurs
|
|
]))
|
|
.pipe(gulp.dest('css/knacss-full'));
|
|
});
|
|
|
|
gulp.task('css:mini', () => {
|
|
return gulp.src('sass/knacss.scss')
|
|
.pipe(sass(
|
|
{
|
|
outputStyle: 'compact'
|
|
}))
|
|
.pipe(
|
|
postcss([
|
|
CombineMQ, // rassemble les Media Queries (parfait pour les classes utilitaires)
|
|
autoprefixer, // ajoute les préfixes vendeurs
|
|
CSSnano // minification
|
|
]))
|
|
.pipe(gulp.dest('css/knacss-mini'));
|
|
});
|
|
|
|
gulp.task('css:grillade', () => {
|
|
return gulp.src('sass/utils/grillade.scss')
|
|
.pipe(sass(
|
|
{
|
|
outputStyle: 'compact'
|
|
}))
|
|
.pipe(
|
|
postcss([
|
|
CombineMQ, // rassemble les Media Queries (parfait pour les classes utilitaires)
|
|
autoprefixer, // ajoute les préfixes vendeurs
|
|
CSSnano // minification
|
|
]))
|
|
.pipe(gulp.dest('css/grillade'));
|
|
});
|
|
|
|
// Tâche BUILD : tapez "gulp" ou "gulp build"
|
|
gulp.task('build', gulp.series('css:full', 'css:mini', 'css:grillade'));
|
|
|
|
// Tâche par défaut
|
|
gulp.task('default', gulp.series('build'));
|