-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
44 lines (36 loc) · 1.06 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"use strict";
const gulp = require('gulp');
const browserSync = require('browser-sync').create();
/*
* Modular Gulp files
*/
require('./gulp/assets.js')(gulp);
require('./gulp/browsersync.js')(gulp, browserSync);
require('./gulp/content.js')(gulp);
require('./gulp/css.js')(gulp);
require('./gulp/documentation.js')(gulp);
require('./gulp/generate.js')(gulp);
require('./gulp/js.js')(gulp);
require('./gulp/webpack.js')(gulp);
require('./gulp/deploy.js')(gulp);
/**
* Default runs Webpack, BrowserSync, Watches...
*/
gulp.task('default', ['sass-component-index'], () => {
gulp.start('assets');
gulp.start('sass');
gulp.start('webpack');
gulp.start('browserSync');
gulp.start('content');
gulp.src('./index.html').pipe(gulp.dest('dist/'));
gulp.watch(['./sass/**/*.scss', './components/**/*.scss'], () => {
gulp.start('sass');
});
gulp.watch(['./components/**/*', './modules/**/*'], () => {
gulp.start('webpack');
});
gulp.watch(['./dist/*'], browserSync.reload);
gulp.watch(['./content/**/*'], () => {
gulp.start('content');
});
});