-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
53 lines (42 loc) · 912 Bytes
/
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
45
46
47
48
49
50
51
52
53
const gulp = require('gulp');
// ----- site ----- //
let taskName = process.argv[2];
// stuff used across tasks
let site = {
// templating data
data: {
productName: 'Infinite Scroll',
majorVersion: 4,
isDev: taskName == 'dev',
isExport: taskName == 'export',
},
};
// ----- tasks ----- //
require('./tasks/assets')( site );
require('./tasks/dist')( site );
require('./tasks/js')( site );
require('./tasks/css')( site );
require('./tasks/content')( site );
// ----- default ----- //
gulp.task( 'default', gulp.parallel(
'content',
'js',
'css',
'dist',
'prod-assets',
) );
// ----- export ----- //
// version of site used in infinite-scroll-docs.zip
gulp.task( 'export', gulp.parallel(
'content',
'js',
'css',
'dist',
'assets',
) );
// ----- watch ----- //
gulp.task( 'dev', gulp.parallel(
'dist',
'prod-assets',
'content',
) );