diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-13 12:16:00 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-13 12:16:00 +0100 |
commit | c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24 (patch) | |
tree | e5177a26dae755833122c4ef73744c2a7f9b53fc /client/config/helpers.js | |
parent | 80deae8d198f6a376b477d780e76966f8fbb72ce (diff) | |
download | PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.tar.gz PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.tar.zst PeerTube-c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24.zip |
Client: add basic aot support
Diffstat (limited to 'client/config/helpers.js')
-rw-r--r-- | client/config/helpers.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/config/helpers.js b/client/config/helpers.js index 6268d2628..ca5923472 100644 --- a/client/config/helpers.js +++ b/client/config/helpers.js | |||
@@ -1,13 +1,17 @@ | |||
1 | const path = require('path') | 1 | const path = require('path') |
2 | 2 | ||
3 | // Helper functions | ||
3 | const ROOT = path.resolve(__dirname, '..') | 4 | const ROOT = path.resolve(__dirname, '..') |
4 | 5 | const EVENT = process.env.npm_lifecycle_event || '' | |
5 | console.log('root directory:', root() + '\n') | ||
6 | 6 | ||
7 | function hasProcessFlag (flag) { | 7 | function hasProcessFlag (flag) { |
8 | return process.argv.join('').indexOf(flag) > -1 | 8 | return process.argv.join('').indexOf(flag) > -1 |
9 | } | 9 | } |
10 | 10 | ||
11 | function hasNpmFlag (flag) { | ||
12 | return EVENT.includes(flag) | ||
13 | } | ||
14 | |||
11 | function isWebpackDevServer () { | 15 | function isWebpackDevServer () { |
12 | return process.argv[1] && !!(/webpack-dev-server$/.exec(process.argv[1])) | 16 | return process.argv[1] && !!(/webpack-dev-server$/.exec(process.argv[1])) |
13 | } | 17 | } |
@@ -18,5 +22,6 @@ function root (args) { | |||
18 | } | 22 | } |
19 | 23 | ||
20 | exports.hasProcessFlag = hasProcessFlag | 24 | exports.hasProcessFlag = hasProcessFlag |
25 | exports.hasNpmFlag = hasNpmFlag | ||
21 | exports.isWebpackDevServer = isWebpackDevServer | 26 | exports.isWebpackDevServer = isWebpackDevServer |
22 | exports.root = root | 27 | exports.root = root |