diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-06-03 22:08:03 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-06-03 22:08:03 +0200 |
commit | 4a6995be18b15de1834a39c8921a0e4109671bb6 (patch) | |
tree | b659661cea33687fcc6bd8fc2251cb7a15ab9f9d /client/config/helpers.js | |
parent | 468892541175f9662f8b1b977e819dc1a496f282 (diff) | |
download | PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.tar.gz PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.tar.zst PeerTube-4a6995be18b15de1834a39c8921a0e4109671bb6.zip |
First draft to use webpack instead of systemjs
Diffstat (limited to 'client/config/helpers.js')
-rw-r--r-- | client/config/helpers.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/client/config/helpers.js b/client/config/helpers.js new file mode 100644 index 000000000..24d7dae9f --- /dev/null +++ b/client/config/helpers.js | |||
@@ -0,0 +1,17 @@ | |||
1 | const path = require('path') | ||
2 | |||
3 | const ROOT = path.resolve(__dirname, '..') | ||
4 | |||
5 | console.log('root directory:', root() + '\n') | ||
6 | |||
7 | function hasProcessFlag (flag) { | ||
8 | return process.argv.join('').indexOf(flag) > -1 | ||
9 | } | ||
10 | |||
11 | function root (args) { | ||
12 | args = Array.prototype.slice.call(arguments, 0) | ||
13 | return path.join.apply(path, [ROOT].concat(args)) | ||
14 | } | ||
15 | |||
16 | exports.hasProcessFlag = hasProcessFlag | ||
17 | exports.root = root | ||