-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.babel.js
71 lines (59 loc) · 1.67 KB
/
gulpfile.babel.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
'use strict';
const
config = require('./gulp/gulpconfig.json'),
gulp = require('gulp'),
fs = require('fs'),
del = require('del'),
browserSync = require('browser-sync').create(),
hygienist = require('hygienist-middleware'),
beepbeep = require('beepbeep'),
browserify = require('browserify'),
babelify = require('babelify'),
watchify = require('watchify'),
source = require('vinyl-source-stream'),
buffer = require('vinyl-buffer'),
plugins = require('gulp-load-plugins')(),
emittyPug = require('emitty').setup(config.dev.templatesRoot, 'pug'),
emittyScss = require('emitty').setup(config.dev.stylesRoot, 'scss'),
bourbon = require('node-bourbon');
/*
Server
*/
require('./gulp/tasks/server')(config, gulp, browserSync, hygienist);
/*
Templates
*/
require('./gulp/tasks/templates')(config, gulp, plugins, browserSync, emittyPug, beepbeep, fs);
/*
Styles
*/
require('./gulp/tasks/styles')(config, gulp, plugins, browserSync, emittyScss, beepbeep, bourbon);
/*
Scripts
*/
require('./gulp/tasks/scripts')(config, gulp, plugins, browserSync, browserify, babelify, watchify, source, buffer, beepbeep);
/*
SVG
*/
require('./gulp/tasks/svg')(config, gulp, plugins, del);
/*
Build
*/
require('./gulp/tasks/build')(config, gulp, plugins, del, browserSync);
gulp.task('default', gulp.series(gulp.parallel('styles', 'scripts', 'svg', 'templates:data'), 'templates', 'server'));
gulp.watch(
[config.path, config.dev.templatesGlob],
gulp.parallel('templates:reload')
);
gulp.watch(
config.dev.dataGlob,
gulp.parallel('templates:data')
);
gulp.watch(
config.dev.stylesGlob,
gulp.parallel('styles')
);
gulp.watch(
config.dev.svgSourceGlob,
gulp.parallel('svg')
);