Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use settings entries if paths are passed in #140

Merged
merged 2 commits into from
Mar 3, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions bin/mastarm
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,22 @@ commander
commander
.command('prepublish [entries...]')
.description('Transpile JavaScript down to ES5 with Babel')
.action(function (entries, options) {
.action(function (cliEntries, options) {
const prepublish = require('../lib/prepublish')
const config = loadConfig(process.cwd(), commander.config, commander.env)
const get = util.makeGetFn([options, commander, config.settings])

const outdir = get('outdir')
const entries = util.parseEntries(cliEntries && cliEntries.length > 0
? cliEntries
: get('entries') || [],
outdir
)

prepublish({
entries: util.parseEntries([...entries, ...(get('entries') || [])], get('outdir')),
entries,
env: get('env'),
outdir: get('outdir')
outdir
})
})

Expand Down