-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.esm.js
99 lines (86 loc) · 3.58 KB
/
gulpfile.esm.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*!
* UniKorn (v1.1.1): gulpfile.esm.js
* Copyright (c) 2020 Adorade (https://adorade.ro)
* Licensed under MIT (https://github.com/adorade/unikorn/blob/master/LICENSE)
* ========================================================================== */
import { series } from './tools/util';
import {
checks, cleanDev, cleanLogs, cleaner, cleanStyles, lintSCSS, compile, minifyCSS,
cleanScripts, lintJS, copyJS, transpile, minifyJS, cleanPages, lintPages, pagile,
cleanStatics, statica, cleanImages, imagine,
pretest, test, coverage, qunit, visual, serve
} from './tools';
/**
* Check dirs, paths, options and settings
* -------------------------------------------------------------------------- */
export { checks };
/**
* Clean - clean all files from 'dist' folder
* -------------------------------------------------------------------------- */
export { cleanDev, cleanLogs, cleaner };
const clean = cleanDev;
/**
* Styles - processes style files
* -------------------------------------------------------------------------- */
const styles = series(lintSCSS, compile, minifyCSS);
export const buildStyles = series(cleanStyles, styles);
buildStyles.displayName = 'build:styles';
buildStyles.description = 'Build only styles files';
/**
* Scripts - processes script files
* -------------------------------------------------------------------------- */
const scripts = series(lintJS, copyJS, transpile, minifyJS);
export const buildScripts = series(cleanScripts, scripts);
buildScripts.displayName = 'build:scripts';
buildScripts.description = 'Build only scripts files';
/**
* Images - processes image files
* -------------------------------------------------------------------------- */
const images = series(imagine);
export const buildImages = series(cleanImages, images);
buildImages.displayName = 'build:images';
buildImages.description = 'Build only images files';
/**
* Statics - processes static files
* -------------------------------------------------------------------------- */
const statics = series(statica);
export const buildStatics = series(cleanStatics, statics);
buildStatics.displayName = 'build:statics';
buildStatics.description = 'Build statics files';
/**
* Templates - processes templates files
* -------------------------------------------------------------------------- */
const pages = series(lintPages, pagile);
export const buildPages = series(cleanPages, pages);
buildPages.displayName = 'build:pages';
buildPages.description = 'Build only html files';
/**
* Test and serve result
* -------------------------------------------------------------------------- */
export const tester = series(pretest, test);
export { coverage, qunit, visual };
/**
* Watch and Serve - watch files for changes and reload
* Starts a BrowerSync instance
* Watch files for changes
* -------------------------------------------------------------------------- */
export { serve };
/**
* Define `build` task - generate files for production
* Builds the documentation and framework files
* -------------------------------------------------------------------------- */
export const build = series(
clean, styles, scripts, images, statics, pages
);
/**
* Define `dev` task - build, edit source, reload
* Runs all of the above tasks and then waits for files to change
* -------------------------------------------------------------------------- */
const dev = series(
build, serve
);
/**
* Define default task that can be called by just running `gulp` from cli
* This is the default task and it does certain things
* -------------------------------------------------------------------------- */
export default dev;