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

Add CLI run example #59

Merged
merged 1 commit into from
Nov 26, 2018
Merged
Changes from all commits
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
10 changes: 8 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ $ ncc build input.js -o dist

Outputs the build of `input.js` into `dist/index.js`.

```bash
$ ncc run input.js
```

Build to a temporary folder and run the executable.

### Node.js

```js
Expand All @@ -46,5 +52,5 @@ require('@zeit/ncc')('/path/to/input', {

## Caveats

- Files / assets are relocated based on a static evaluator. Dynamic non-statically analyzable asset loads may not work out.
- Dynamic requires are inlined only so far as they are statically analyzable. There may be ways to improve this as discussed in https://github.com/zeit/ncc/issues/41.
- Files / assets are relocated based on a static evaluator. Dynamic non-statically analyzable asset loads may not work out correctly.
- Dynamic requires are inlined only so far as they are statically analyzable. There may be ways to improve this as discussed in https://github.com/zeit/ncc/issues/41.