-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulp.config.js
executable file
·60 lines (58 loc) · 1.42 KB
/
gulp.config.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
// Configures gulp build
// See gulpfile.babel.js for build pipeline
import {resolve} from "path"
export default function(env) {
const src = "src/"
const dest = "hugo/"
const tmp = ".tmp/"
const build = "dist/"
const isProduction = process.env.NODE_ENV === "production"
return {
src: src,
dest: dest,
tmp: tmp,
build: build,
hugoArgs: {
default: ["-v", "--source", resolve(dest), "--destination", resolve(build)],
development: ["-b", "http://localhost:3000", "--buildDrafts", "--buildFuture", "--buildExpired"],
preview: ["-b", "http://localhost:3000"],
production: []
},
styles: {
src:
[
src + "css/*.+(css|scss|sass)",
src + "scss/*.+(css|scss|sass)"
],
watch:
[
src + "css/**/*.+(css|scss|sass)",
src + "scss/**/*.+(css|scss|sass)"
],
dest: dest + "static/css",
tmp: tmp + "css"
},
scripts: {
src: src + "js/*+(js|jsx)",
watch: src + "js/**/*+(js|jsx)",
dest: dest + "static/js/",
tmp: tmp + "js/"
},
svg: {
src: src + "img/**/*.svg",
watch: src + "img/**/*.svg",
dest: dest + "static/svg/",
config: {
dest: ".",
mode: {
symbol: {
sprite: "sprite.symbol.svg",
prefix: "svg-%s",
dest: "."
}
},
example: (isProduction) ? false : true
}
}
}
}