|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
//@format
|
|
|
|
|
const yaml = require('js-yaml'); |
|
|
|
|
const fs = require('fs'); |
|
|
|
|
const { SITE, PORT, BSREWRITE, PATHS } = loadConfig(); |
|
|
|
|
const {SITE, PORT, BSREWRITE, PATHS} = loadConfig(); |
|
|
|
|
//var server = require('browser-sync').create();
|
|
|
|
|
//global.server = server;
|
|
|
|
|
const gulp = require('gulp'); |
|
|
|
@ -37,13 +37,13 @@ function bsInit__remote(done) {
|
|
|
|
|
rewriteRules: [ |
|
|
|
|
{ |
|
|
|
|
match: BSREWRITE.Css.Match, |
|
|
|
|
replace: BSREWRITE.Css.Replace |
|
|
|
|
replace: BSREWRITE.Css.Replace, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
match: BSREWRITE.Js.Match, |
|
|
|
|
replace: BSREWRITE.Js.Replace |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
replace: BSREWRITE.Js.Replace, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
} |
|
|
|
@ -62,7 +62,8 @@ function drush() {
|
|
|
|
|
// Compile CSS
|
|
|
|
|
function styles() { |
|
|
|
|
'use strict'; |
|
|
|
|
return gulp |
|
|
|
|
return ( |
|
|
|
|
gulp |
|
|
|
|
//.src(PATHS.Scss.Dir + '/**/*.scss')
|
|
|
|
|
.src('./css/sass/**/*.scss') |
|
|
|
|
.pipe(plumber()) |
|
|
|
@ -70,15 +71,16 @@ function styles() {
|
|
|
|
|
.pipe( |
|
|
|
|
sass |
|
|
|
|
.sync({ |
|
|
|
|
includePaths: PATHS.Scss.Libraries |
|
|
|
|
includePaths: PATHS.Scss.Libraries, |
|
|
|
|
}) |
|
|
|
|
.on('error', sass.logError) |
|
|
|
|
.on('error', sass.logError), |
|
|
|
|
) |
|
|
|
|
//.pipe(cleanCSS())
|
|
|
|
|
.pipe(cleanCSS()) |
|
|
|
|
.pipe(sourcemaps.write('.')) |
|
|
|
|
//.pipe(gulp.dest(PATHS.Css.Dir))
|
|
|
|
|
.pipe(gulp.dest('./css')) |
|
|
|
|
.pipe(browsersync.stream()); |
|
|
|
|
.pipe(browsersync.stream()) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Watch Files
|
|
|
|
@ -93,11 +95,11 @@ function watchFiles() {
|
|
|
|
|
const build = gulp.parallel(styles); |
|
|
|
|
const watch_remote = gulp.series( |
|
|
|
|
styles, |
|
|
|
|
gulp.parallel(watchFiles, bsInit__remote) |
|
|
|
|
gulp.parallel(watchFiles, bsInit__remote), |
|
|
|
|
); |
|
|
|
|
const watch_local = gulp.series( |
|
|
|
|
styles, |
|
|
|
|
gulp.parallel(watchFiles, bsInit__local) |
|
|
|
|
gulp.parallel(watchFiles, bsInit__local), |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Export tasks
|
|
|
|
|