-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
68 lines (62 loc) · 1.26 KB
/
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
61
62
63
64
65
66
67
68
let _ = require("lodash")
let gutil = require("gulp-util")
let env = gutil.env.env || "development"
let paths = {
default: {
src: {
javascripts: "src/javascripts/main.js",
stylesheets: "src/stylesheets/main.styl",
},
dest: {
javascripts: "duelyst-previous-challenges.js",
stylesheets: "duelyst-previous-challenges.css",
constants: "pt-constants.js",
constantsDir: "build",
},
},
development: {
dest: {
dir: "build",
},
},
production: {
dest: {
dir: "dist",
},
},
}
paths = _.merge({}, paths.default, paths[env])
let constants = {
default: {},
development: {
cssPath: `file://${__dirname}/${paths.dest.dir}/${paths.dest.stylesheets}`,
},
production: {
cssPath: `https://penguintoast.github.io/duelyst-previous-challenges/dist/${paths.dest.stylesheets}`,
},
}
constants = _.merge({}, constants.default, constants[env])
let plugin = {
default: {
browserify: {
paths: ["build"],
},
},
development: {
browserify: {
debug: true,
},
},
production: {
stylus: {
compress: true,
},
},
}
plugin = _.merge({}, plugin.default, plugin[env])
module.exports = {
paths,
constants,
plugin,
production: env === "production",
}