Skip to content

Commit

Permalink
Merge pull request #160 from conveyal/dev
Browse files Browse the repository at this point in the history
v3.7.1
  • Loading branch information
trevorgerhardt authored Mar 31, 2017
2 parents 394bc65 + d4d8e6a commit 191aaf6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/mastarm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ commander
const config = loadConfig(process.cwd(), commander.config, commander.env)
const get = util.makeGetFn([options, commander, config.settings])

const env = get('env')
const env = get('env') || 'development'
const s3bucket = get('s3bucket')

const files = util.parseEntries([...entries, ...(get('entries') || [])])
Expand Down
11 changes: 8 additions & 3 deletions lib/js-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ const through = require('through2')
const YAML = require('yamljs')

const babelConfig = require('./babel-config')
const util = require('./util')

module.exports = function transform ({
config,
env
}) {
util.configureEnvironment({config, env})
const envvars = Object.assign({}, process.env, {
CONFIG_PATH: config.path,
MESSAGES: JSON.stringify(config.messages),
NODE_ENV: env,
SETTINGS: JSON.stringify(config.settings),
STORE: JSON.stringify(config.store)
}, config.env)

return [
svgToString,
Expand All @@ -22,7 +27,7 @@ module.exports = function transform ({
}),
yamlTransform,
babelify.configure(babelConfig(env)),
[envify(process.env), {global: true}] // Envify needs to happen last...
[envify(envvars), {global: true}] // Envify needs to happen last...
]
}

Expand Down

0 comments on commit 191aaf6

Please sign in to comment.