-
Notifications
You must be signed in to change notification settings - Fork 3
/
gulpfile.babel.js
53 lines (48 loc) · 1.52 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
// GULP TASKS:
// gulp - starting default gulp task (build, server, watch) for development;
// gulp build - build project;
// gulp removeDist - delete dist folder;
// gulp img - image compression;
// gulp zip - project archiving;
//
// ADDITIONAL OPTIONS:
// --pug - using pug preprocessor to generate html
// --prod - minification js, minification css, add vendor prefixes, group media queries, remove comments
import gulp from 'gulp';
import config from './gulp/config.js';
import clean from './gulp/tasks/clean.js';
import html from './gulp/tasks/html.js';
import pug from './gulp/tasks/pug.js';
import sass from './gulp/tasks/sass.js';
import jsCommon from './gulp/tasks/js-common.js';
import jsLibs from './gulp/tasks/js-libs.js';
import imgCommon from './gulp/tasks/img-common.js';
import imgFavicon from './gulp/tasks/img-favicon.js';
import fonts from './gulp/tasks/fonts.js';
import additionalFiles from './gulp/tasks/additional-files.js';
import zipTask from './gulp/tasks/zip.js';
import server from './gulp/tasks/server.js';
import watch from './gulp/tasks/watch.js';
config.setEnv();
export const removeDist = clean;
export const img = imgCommon;
export const favicon = imgFavicon;
export const zip = zipTask;
export const build = gulp.series(
clean,
gulp.parallel(
config.isPug ? pug : html,
sass,
jsCommon,
jsLibs,
imgCommon,
imgFavicon,
fonts,
additionalFiles,
)
);
export default gulp.series(
build,
server,
watch,
);