Skip to content

Commit

Permalink
Merge pull request #243 from conveyal/add-env-vars
Browse files Browse the repository at this point in the history
Add some useful environment variables
  • Loading branch information
evansiroky authored Sep 5, 2018
2 parents 183bf6b + 3dedc35 commit 6517a18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/js-transform.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const babelify = require('babelify')
const envify = require('envify/custom')
const markdown = require('browserify-markdown')
const pkg = require('../lib/pkg')
const commit = require('this-commit')()
const through = require('through2')
const YAML = require('yamljs')

Expand All @@ -11,9 +13,12 @@ module.exports = function transform ({ config, env }) {
{},
process.env,
{
BUILD_TIMESTAMP: (new Date()).getTime(),
COMMIT_SHA: commit,
CONFIG_PATH: config.path,
MESSAGES: JSON.stringify(config.messages),
NODE_ENV: env,
REPO_URL: pkg.repository && pkg.repository.url && pkg.repository.url.replace('.git', ''),
SETTINGS: JSON.stringify(config.settings),
STORE: JSON.stringify(config.store)
},
Expand Down

0 comments on commit 6517a18

Please sign in to comment.