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
feat: add cwd
option to es6+ instrument command
#1024
Changes from 5 commits
cdffff8
aaece80
0f4194b
85117f0
23f875f
9822a8b
c454b56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ exports.command = 'instrument <input> [output]' | |
exports.describe = 'instruments a file or a directory tree and writes the instrumented code to the desired output location' | ||
|
||
exports.builder = function (yargs) { | ||
const cwd = process.cwd() | ||
return yargs | ||
.option('require', { | ||
alias: 'i', | ||
|
@@ -28,6 +29,10 @@ exports.builder = function (yargs) { | |
type: 'boolean', | ||
description: "should nyc's instrumenter produce source maps?" | ||
}) | ||
.option('cwd', { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Existing: The important thing is that |
||
describe: 'working directory used when resolving paths', | ||
default: cwd | ||
}) | ||
.option('compact', { | ||
default: true, | ||
type: 'boolean', | ||
|
@@ -73,6 +78,7 @@ exports.handler = function (argv) { | |
produceSourceMap: argv.produceSourceMap, | ||
extension: argv.extension, | ||
require: argv.require, | ||
cwd: argv.cwd, | ||
coreyfarrell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
compact: argv.compact, | ||
preserveComments: argv.preserveComments, | ||
esModules: argv.esModules, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My gut reaction is that we these changes to
index.js
should not happen.