-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp_options.js
73 lines (64 loc) · 1.88 KB
/
gulp_options.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
const deploy = '../../public/';
const dist = 'dist/';
module.exports.isProduction = (process.env.NODE_ENV ? process.env.NODE_ENV.trim().toLowerCase() : '') === 'production';
module.exports.browserSyncConfig = {
server: {
baseDir: './dist',
},
open: false,
injectChanges: false,
logFileChanges: false,
host: 'localhost',
port: 3000,
};
module.exports.path = {
clean: './dist',
dist,
deploy: {
from: `${dist}/assets/**/*.*`,
to: deploy,
},
fonts: {
src: 'src/components/typography/fonts/**/*.*',
watch: 'src/components/typography/fonts/**/*.*',
dist: `${dist}/assets/fonts`,
deploy: `${deploy}/assets/fonts`,
},
html: {
src: 'src/pages/**/*.pug',
watch: 'src/{app,pages,components}/**/*.pug',
dist,
},
css: {
src: ['src/app/app.styl', 'src/pages/**/*.styl'],
watch: 'src/{app,pages,components}/**/*.{styl,css}',
dist: `${dist}assets/css/`,
deploy: `${deploy}assets/css/`,
},
js: {
src: ['src/app/app.js', 'src/pages/**/*.js'],
watch: 'src/{app,pages,components}/**/*.{js,json}',
dist: `${dist}assets/js/`,
deploy: `${deploy}assets/js/`,
publicPath: '/assets/js/',
},
img: {
src: 'src/{components,pages}/**/*.{jpg,png,svg,gif}',
watch: 'src/{pages,components}/**/*.{jpg,png,svg,gif}',
dist: `${dist}assets/images/`,
deploy: `${deploy}assets/images/`,
},
sprites: {
svg: {
src: 'src/app/sprites/**/*.svg',
watch: 'src/app/sprites/**/*.svg',
},
png: {
src: 'src/app/sprites/**/*.png',
watch: 'src/app/sprites/**/*.png',
},
styles: 'src/app/sprites/styles',
dist: `${dist}assets/images/sprites/`,
deploy: `${deploy}assets/images/sprites/`,
},
};