-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgulpfile.babel.js
More file actions
57 lines (49 loc) · 1.16 KB
/
gulpfile.babel.js
File metadata and controls
57 lines (49 loc) · 1.16 KB
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
import gulp from 'gulp';
import path from 'path';
import del from 'del';
import through2 from 'through2';
import changed from 'gulp-changed';
import prettyError from 'gulp-prettyerror';
import { log } from "./lib/logger.js";
// import babel from 'gulp-babel';
const { src, dest, task, parallel, series, watch } = gulp;
const paths = {
profile: {
src:
},
styles: {
src: 'chrome/css/**',
},
scripts: {
src: 'chrome/scripts/**',
}
};
/*
* For small tasks you can export arrow functions
*/
export const clean = () => del([ 'assets' ]);
/*
* You can also declare named functions and export them as tasks
*/
export styles() => {
src(paths.styles.src)
.pipe(dest(paths.styles.dest));
}
export scripts() => {
src(paths.scripts.src)
.pipe(changed(cfg.dest()))
.pipe(dest(paths.scripts.dest));
}
/*
* You could even use `export as` to rename exported tasks
*/
function watchFiles() {
watch(paths.scripts.src, scripts);
watch(paths.styles.src, styles);
}
export { watchFiles as watch };
const build = series(clean, parallel(styles, scripts));
/*
* Export a default task
*/
export default build;