mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-10 12:26:35 +03:00
18 lines
395 B
JavaScript
18 lines
395 B
JavaScript
const path = require('path')
|
|
|
|
const ROOT = path.resolve(__dirname, '..')
|
|
|
|
console.log('root directory:', root() + '\n')
|
|
|
|
function hasProcessFlag (flag) {
|
|
return process.argv.join('').indexOf(flag) > -1
|
|
}
|
|
|
|
function root (args) {
|
|
args = Array.prototype.slice.call(arguments, 0)
|
|
return path.join.apply(path, [ROOT].concat(args))
|
|
}
|
|
|
|
exports.hasProcessFlag = hasProcessFlag
|
|
exports.root = root
|