UNPKG

cross-ci

Version:

`cross-ci` standardizes environment variables for CI. For example, your can simply use `BUILD_BRANCH` variable in all CI runners instead of `CIRCLE_BRANCH` in CircleCI or `TRAVIS_PULL_REQUEST_BRANCH` in Travis.

12 lines (9 loc) 247 B
const path = require('path'); const dir = process.cwd(); const pkg = path.join(dir, 'package.json'); try { // eslint-disable-next-line import/no-dynamic-require module.exports = require(pkg); } catch (error) { module.exports = {}; }