aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/config/helpers.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-13 12:16:00 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-13 12:16:00 +0100
commitc16ce1de8e8c21ad2136335d3b0b7d230e6d2f24 (patch)
treee5177a26dae755833122c4ef73744c2a7f9b53fc /client/config/helpers.js
parent80deae8d198f6a376b477d780e76966f8fbb72ce (diff)
downloadPeerTube-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.js9
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 @@
1const path = require('path') 1const path = require('path')
2 2
3// Helper functions
3const ROOT = path.resolve(__dirname, '..') 4const ROOT = path.resolve(__dirname, '..')
4 5const EVENT = process.env.npm_lifecycle_event || ''
5console.log('root directory:', root() + '\n')
6 6
7function hasProcessFlag (flag) { 7function hasProcessFlag (flag) {
8 return process.argv.join('').indexOf(flag) > -1 8 return process.argv.join('').indexOf(flag) > -1
9} 9}
10 10
11function hasNpmFlag (flag) {
12 return EVENT.includes(flag)
13}
14
11function isWebpackDevServer () { 15function 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
20exports.hasProcessFlag = hasProcessFlag 24exports.hasProcessFlag = hasProcessFlag
25exports.hasNpmFlag = hasNpmFlag
21exports.isWebpackDevServer = isWebpackDevServer 26exports.isWebpackDevServer = isWebpackDevServer
22exports.root = root 27exports.root = root