Skip to content

Commit

Permalink
feat(env): Allow setting env in budo
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorgerhardt committed Nov 1, 2016
1 parent 91e741a commit 07a3c9e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
25 changes: 12 additions & 13 deletions bin/mastarm
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,21 @@ commander
console.log('No entry point found! Did you spell the filename correctly?')
process.exit(1)
}
const opts = {
config,
env: get('env'),
files,
flyle: get('flyle'),
minify: get('minify'),
proxy: get('proxy'),
watch: get('watch')
}
if (get('serve')) {
const budo = require('../lib/budo')
budo({
config,
files,
flyle: get('flyle'),
proxy: get('proxy')
})
budo(opts)
} else {
const build = require('../lib/build')
build({
config,
env: get('env'),
files,
minify: get('minify'),
watch: get('watch')
})
build(opts)
}
})

Expand Down Expand Up @@ -85,6 +83,7 @@ commander
s3bucket: get('s3bucket')
}))).then(() => {
console.log('Finished pushing to s3')
process.exit(0)
}).catch((err) => {
console.error(err.stack)
process.exit(1)
Expand Down
3 changes: 2 additions & 1 deletion lib/budo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const transformCss = require('./css-transform')

module.exports = function ({
config,
env,
files,
flyle,
proxy
Expand All @@ -19,7 +20,7 @@ module.exports = function ({
],
transform: transformJs({
config,
env: 'development'
env
})
},
cors: true,
Expand Down
1 change: 0 additions & 1 deletion lib/push-to-s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ function upload ({
.upload()
.send(function (err, data) {
if (err) reject(err)

console.log('finished pushing %s to s3', outfile)

if (cloudfront) {
Expand Down

0 comments on commit 07a3c9e

Please sign in to comment.