|
@@ -28,16 +28,17 @@ function handleError(err) {
|
|
|
console.log(err.toString());
|
|
|
}
|
|
|
|
|
|
-gulp.task('scripts', function () {
|
|
|
+gulp.task('scripts', done => {
|
|
|
gulp.src(['./assets/scripts/main.js', './assets/scripts/redirect.js']) // './assets/scripts/shared_variables.js',
|
|
|
// .pipe(concat('main.js'))
|
|
|
.pipe(gulpif(prod, stripDebug()))
|
|
|
.pipe(gulpif(prod, jsmin()))
|
|
|
.pipe(rename({suffix: '.min'}))
|
|
|
.pipe(gulp.dest('./assets/dist/scripts/'));
|
|
|
+ done()
|
|
|
});
|
|
|
|
|
|
-gulp.task('styles', function () {
|
|
|
+gulp.task('styles', done => {
|
|
|
gulp.src(['./assets/styles/app.scss'])
|
|
|
.pipe(sass().on('error', sass.logError))
|
|
|
.pipe(autoprefixer({
|
|
@@ -49,44 +50,49 @@ gulp.task('styles', function () {
|
|
|
// .pipe(cssmin())
|
|
|
.pipe(rename({suffix: '.min'}))
|
|
|
.pipe(gulp.dest('./assets/dist/styles/'));
|
|
|
+ done()
|
|
|
});
|
|
|
|
|
|
-gulp.task('bower', function() {
|
|
|
- gulp.src(mainBowerFiles({
|
|
|
- "overrides":{
|
|
|
- "masonry-layout":{
|
|
|
- "main":"./dist/masonry.pkgd.min.js"
|
|
|
- },
|
|
|
- "imagesloaded":{
|
|
|
- "main":"./imagesloaded.pkgd.min.js"
|
|
|
- },
|
|
|
- "jquery":{"ignore":true},
|
|
|
- "ev-emitter":{"ignore":true},
|
|
|
- "fizzy-ui-utils":{"ignore":true},
|
|
|
- "get-size":{"ignore":true},
|
|
|
- "outlayer":{"ignore":true},
|
|
|
- }
|
|
|
- }))
|
|
|
- .pipe(gulp.dest('./assets/dist/bower/'));
|
|
|
+gulp.task('bower', done => {
|
|
|
+ gulp.src(mainBowerFiles({
|
|
|
+ "overrides":{
|
|
|
+ "masonry-layout":{
|
|
|
+ "main":"./dist/masonry.pkgd.min.js"
|
|
|
+ },
|
|
|
+ "imagesloaded":{
|
|
|
+ "main":"./imagesloaded.pkgd.min.js"
|
|
|
+ },
|
|
|
+ "jquery":{"ignore":true},
|
|
|
+ "ev-emitter":{"ignore":true},
|
|
|
+ "fizzy-ui-utils":{"ignore":true},
|
|
|
+ "get-size":{"ignore":true},
|
|
|
+ "outlayer":{"ignore":true},
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ .pipe(gulp.dest('./assets/dist/bower/'));
|
|
|
+ done()
|
|
|
});
|
|
|
|
|
|
-gulp.task('svg', function () {
|
|
|
+gulp.task('svg', done => {
|
|
|
gulp.src(['./assets/img/*.svg', '!./assets/img/edlp-loader-anim.svg'])
|
|
|
.pipe(svgmin())
|
|
|
.pipe(gulp.dest('./assets/dist/img'));
|
|
|
gulp.src('./assets/img/edlp-loader-anim.svg')
|
|
|
.pipe(gulp.dest('./assets/dist/img'));
|
|
|
+ done()
|
|
|
});
|
|
|
|
|
|
// default gulp task
|
|
|
// , 'vars2sass' 'vars2js',
|
|
|
-gulp.task('default', ['bower', 'scripts', 'styles', 'svg'], function() {
|
|
|
+// gulp.task('default', ['bower', 'scripts', 'styles', 'svg'], function() {
|
|
|
+gulp.task('default', gulp.series('bower', 'scripts', 'styles', 'svg', function(done) {
|
|
|
// gulp.watch('./assets/json/*.json', ['vars2js', 'styles', 'scripts']); //, 'vars2sass'
|
|
|
- gulp.watch('./assets/styles/*.scss', ['styles']);
|
|
|
- gulp.watch('./assets/styles/base/*.scss', ['styles']);
|
|
|
- gulp.watch('./assets/scripts/*.js', ['scripts']);
|
|
|
- gulp.watch('./assets/img/*.svg', ['svg']);
|
|
|
-});
|
|
|
+ gulp.watch('./assets/styles/*.scss', gulp.series('styles'));
|
|
|
+ gulp.watch('./assets/styles/base/*.scss', gulp.series('styles'));
|
|
|
+ gulp.watch('./assets/scripts/*.js', gulp.series('scripts'));
|
|
|
+ gulp.watch('./assets/img/*.svg', gulp.series('svg'));
|
|
|
+ done()
|
|
|
+}));
|
|
|
|
|
|
|
|
|
|