Skip to content

Commit fb247f5

Browse files
committed
Fix the gulp build task
1 parent a859c72 commit fb247f5

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Diff for: build/gulpfile.js

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
var gulp = require('gulp');
2+
var gulp = require('gulp');
33
var plugins = require('gulp-load-plugins')();
44

55
/********************************************
@@ -31,9 +31,9 @@ const vendor_scripts = require('./tasks/vendor-scripts').task(gulp, plugins, pat
3131
const vendor_styles = require('./tasks/vendor-styles').task(gulp, plugins, paths);
3232

3333
const clean = (done) => {
34-
// Error: Cannot delete files/directories outside the current
34+
// Error: Cannot delete files/directories outside the current
3535
// working directory. Can be overridden with the `force` option.
36-
return require('del')([config.destDir], {force: true});
36+
return require('del')([config.destDir], { force: true });
3737
};
3838

3939
const build = gulp.parallel(
@@ -47,15 +47,15 @@ const build = gulp.parallel(
4747

4848
// Local server pointing on build folder
4949
const connect = () => {
50-
return plugins.connect.server({
51-
root: config.destDir,
52-
port: config.port || 3333,
53-
livereload: true
54-
});
50+
return plugins.connect.server({
51+
root: config.destDir,
52+
port: config.port || 3333,
53+
livereload: true
54+
});
5555
};
5656

5757
const watch = (done) => {
58-
// When template changes recompile .html pages
58+
// When template changes recompile .html pages
5959
gulp.watch(paths.app.templates, app_pages);
6060
// When context file changes recompile .html pages
6161
gulp.watch(config.srcDir + "/**/.context.js", app_pages);
@@ -70,12 +70,12 @@ const watch = (done) => {
7070
};
7171

7272
// Builds and deploys to github pages
73-
const deploy = () => gulp.series(build, () =>
73+
const deploy = () => gulp.series(build, () =>
7474
gulp.src('../dist/**/*')
7575
.pipe(plugins.ghPages({
7676
cacheDir: '../.deploy'
7777
}))
78-
);
78+
);
7979

8080
module.exports.deploy = deploy;
8181

@@ -84,4 +84,5 @@ module.exports.deploy = deploy;
8484
*********************************************/
8585

8686
// Run this task for development
87-
module.exports.default = gulp.series(clean, build, gulp.parallel(watch, connect));
87+
module.exports.build = build;
88+
module.exports.default = gulp.series(clean, build, gulp.parallel(watch, connect));

0 commit comments

Comments
 (0)