Make gulpfile aestheticaly more like gulpfile in ZURB template
This commit is contained in:
parent
dcc4a7bdd1
commit
0ecf7be4a3
1 changed files with 4 additions and 4 deletions
|
@ -23,10 +23,10 @@ const sassLint = require('gulp-sass-lint');
|
||||||
// Load all Gulp plugins into one variable.
|
// Load all Gulp plugins into one variable.
|
||||||
const $ = plugins();
|
const $ = plugins();
|
||||||
|
|
||||||
// Check for --production flag.
|
// Check for --production flag
|
||||||
const PRODUCTION = !!(yargs.argv.production);
|
const PRODUCTION = !!(yargs.argv.production);
|
||||||
|
|
||||||
// Load settings from config.yml.
|
// Load settings from config.yml
|
||||||
function loadConfig() {
|
function loadConfig() {
|
||||||
const unsafe = require('js-yaml-js-types').all;
|
const unsafe = require('js-yaml-js-types').all;
|
||||||
const schema = yaml.DEFAULT_SCHEMA.extend(unsafe);
|
const schema = yaml.DEFAULT_SCHEMA.extend(unsafe);
|
||||||
|
@ -48,7 +48,7 @@ gulp.task('default',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Delete the compiled js and css.
|
// Delete the compiled js and css.
|
||||||
// This happens every time a build starts.
|
// This happens every time a build starts
|
||||||
function clean(done) {
|
function clean(done) {
|
||||||
rimraf(PATHS.dist, done);
|
rimraf(PATHS.dist, done);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ function sassBuild() {
|
||||||
.pipe(sass({
|
.pipe(sass({
|
||||||
includePaths: PATHS.foundationScss
|
includePaths: PATHS.foundationScss
|
||||||
})
|
})
|
||||||
.on('error', $.sass.logError))
|
.on('error', $.sass.logError))
|
||||||
.pipe(postcss(postCssPlugins))
|
.pipe(postcss(postCssPlugins))
|
||||||
.pipe($.if(PRODUCTION, $.cleanCss({ compatibility: 'ie11' })))
|
.pipe($.if(PRODUCTION, $.cleanCss({ compatibility: 'ie11' })))
|
||||||
.pipe($.if(!PRODUCTION, $.sourcemaps.write()))
|
.pipe($.if(!PRODUCTION, $.sourcemaps.write()))
|
||||||
|
|
Loading…
Reference in a new issue