-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.js
More file actions
22 lines (19 loc) · 1.02 KB
/
Copy pathgulpfile.js
File metadata and controls
22 lines (19 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*jslint node:true, esnext: true */
'use strict';
const path = require('path'),
gulp = require('gulp'),
tasksPath = path.join(__dirname, 'gulp-tasks'),
gulpSequence = require('gulp-sequence');
// Load all gulp tasks, using the name of each file in the tasksPath as the name of the task.
require('fs').readdirSync(tasksPath).forEach(
function (filename) {
gulp.task(path.basename(filename, '.js'), require(path.join(tasksPath, filename))(gulp));
}
);
gulp.task('build', gulpSequence('dist-clean', ['html', 'css', 'js', 'static', 'redirect']));
//gulp.task('build', gulpSequence('dist-clean', ['html', 'css', 'js', 'static'], 'icons', 'css-critical'));
gulp.task('build-dev', [ 'css-dev', 'js-dev', 'static', 'html', 'redirect']);
gulp.task('watch', ['build-dev', 'css-watch', 'js-watch', 'static-watch', 'html-watch']);
gulp.task('develop', ['build-dev', 'watch', 'server']);
gulp.task('default', ['build']);
gulp.task('icons', gulpSequence('icons-svgo', 'icons-update-page', 'icons-create', 'icons-clean'));