-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
56 lines (51 loc) · 1.53 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
45
46
47
48
49
50
51
52
53
54
55
56
import gulp from 'gulp';
import { cleanDev, cleanProd, cleanGitkeep } from './gulp/clean.js';
// import { htmlDev, htmlProd } from './gulp/html.js';
import { pugDev, pugProd } from './gulp/pug.js';
// import { cssDev, cssProd } from './gulp/css.js';
import { sassDev, sassProd } from './gulp/sass.js';
// import { stylusDev, stylusProd } from './gulp/stylus.js';
import { jsDev, jsProd } from './gulp/js.js';
import { fontsDev, fontsProd } from './gulp/fonts.js';
import { imagesDev, imagesProd } from './gulp/images.js';
// import { videosDev, videosProd } from './gulp/videos.js';
import { helpersDev, helpersProd } from './gulp/helpers.js';
import { serverDev, serverProd, serverDemo } from './gulp/server.js';
import { watchDev } from './gulp/watch.js';
// CLEANUP TASK
// Removes .gitkeep placeholders from work directories
export const cleanup = gulp.series(
cleanGitkeep
);
// DEVELOPMENT TASK
// Compiles pug, sass, copies css, bundles scripts, copies fonts/ images/ videos/ helpers,
// runs static server, watches for changes and reloads page
export const dev = gulp.series(
pugDev,
sassDev,
jsDev,
fontsDev,
imagesDev,
helpersDev,
serverDev,
watchDev
);
// PRODUCTION TASK
// Builds project from sources, minifies markup / stylesheets / scripts, runs static server
export const prod = gulp.series(
cleanProd,
pugProd,
sassProd,
jsProd,
fontsProd,
imagesProd,
helpersProd,
serverProd
);
// DEMONSTRATION TASK
// Runs static server
export const demo = gulp.series(
serverDemo
);
// DEFAULT TASK
export default dev;