-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.babel.js
49 lines (39 loc) · 1.23 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
import Taskerify from 'taskerify';
Taskerify.config.sourcemaps = false;
Taskerify.config.srcPath = './src/assets'; // Src Path
Taskerify.config.distPath = './dist/assets'; // Dist Path
Taskerify.config.srcViewsPath = './src'; // Views Src Path
Taskerify.config.distViewsPath = './dist'; // Compiled Views Dist Path (HTML)
const SRC = Taskerify.config.srcPath;
const DIST = Taskerify.config.distPath;
const storeName = 'boilerplate';
const files = ['globals', 'home'];
Taskerify((mix) => {
// PugJS Template
mix.pug();
// Image Minifier
mix.imagemin(`${SRC}/images`, `${DIST}/images`);
// Files
files.map((file) => {
mix.browserify(`${SRC}/js/${storeName}-${file}.js`, `${DIST}/js`)
.sass(`${SRC}/scss/${storeName}-${file}.scss`, `${DIST}/css`);
});
mix.browserSync({
open: 'external',
https: true,
port: 8888,
watch: true,
ui: false,
proxy: false,
server: {
baseDir: `./dist`,
serveStaticOptions: {
extensions: ['html','css','js']
}
},
files: [
`${DIST}/css/*.css`,
`${DIST}/js/*.js`,
],
});
});