aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/config/helpers.js
blob: 24d7dae9f406b7e8c4f7fc603c62c8ef96ce6cdb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                   
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