diff options
Diffstat (limited to 'client/config/helpers.js')
-rw-r--r-- | client/config/helpers.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/client/config/helpers.js b/client/config/helpers.js deleted file mode 100644 index ca5923472..000000000 --- a/client/config/helpers.js +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | const path = require('path') | ||
2 | |||
3 | // Helper functions | ||
4 | const ROOT = path.resolve(__dirname, '..') | ||
5 | const EVENT = process.env.npm_lifecycle_event || '' | ||
6 | |||
7 | function hasProcessFlag (flag) { | ||
8 | return process.argv.join('').indexOf(flag) > -1 | ||
9 | } | ||
10 | |||
11 | function hasNpmFlag (flag) { | ||
12 | return EVENT.includes(flag) | ||
13 | } | ||
14 | |||
15 | function isWebpackDevServer () { | ||
16 | return process.argv[1] && !!(/webpack-dev-server$/.exec(process.argv[1])) | ||
17 | } | ||
18 | |||
19 | function root (args) { | ||
20 | args = Array.prototype.slice.call(arguments, 0) | ||
21 | return path.join.apply(path, [ROOT].concat(args)) | ||
22 | } | ||
23 | |||
24 | exports.hasProcessFlag = hasProcessFlag | ||
25 | exports.hasNpmFlag = hasNpmFlag | ||
26 | exports.isWebpackDevServer = isWebpackDevServer | ||
27 | exports.root = root | ||