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

fix: unify target arg description, add transpile-only arg to readme #702

Merged
merged 5 commits into from May 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion readme.md
Expand Up @@ -63,10 +63,11 @@ Outputs the Node.js compact build of `input.js` into `dist/index.js`.
-e, --external [mod] Skip bundling 'mod'. Can be used many times
-q, --quiet Disable build summaries / non-error outputs
-w, --watch Start a watched build
-t, --transpile-only Use transpileOnly option with the ts-loader
--v8-cache Emit a build using the v8 compile cache
--license [file] Adds a file containing licensing information to the output
--stats-out [file] Emit webpack stats as json to the specified output file
--target [es2015|es2020] Select ecmascript target to use for output
--target [es2015|es2020] ECMAScript target to use for output (default: es2015)
Simek marked this conversation as resolved.
Show resolved Hide resolved
```

### Execution Testing
Expand Down
4 changes: 2 additions & 2 deletions src/cli.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node

const { resolve, relative, dirname, sep, extname } = require("path");
const { resolve, relative, dirname, sep } = require("path");
const glob = require("glob");
const shebangRegEx = require("./utils/shebang");
const rimraf = require("rimraf");
Expand Down Expand Up @@ -35,7 +35,7 @@ Options:
--v8-cache Emit a build using the v8 compile cache
--license [file] Adds a file containing licensing information to the output
--stats-out [file] Emit webpack stats as json to the specified output file
--target What build target to use for webpack (default: es6)
--target [es2015|es2020] ECMAScript target to use for output (default: es2015)
Simek marked this conversation as resolved.
Show resolved Hide resolved
Simek marked this conversation as resolved.
Show resolved Hide resolved
`;

// support an API mode for CLI testing
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -78,7 +78,7 @@ function ncc (
}

if (target && !target.startsWith('es')) {
throw new Error(`Invalid "target" value provided ${target}, value must be es version e.g. es5`)
throw new Error(`Invalid "target" value provided ${target}, value must be es version e.g. es2015`)
}

const resolvedEntry = resolve.sync(entry);
Expand Down