Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Dec 3, 2018
1 parent 18e10d1 commit 2ca4a69
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ together with all its dependencies, gcc-style.
## Design goals

- Zero configuration
- Only support Node.js (soon, optionally with TypeScript) codebases
- Make it work as well as possible with the entire Node.js / npm ecosystem
- TypeScript built-in
- Only supports Node.js programs as input / output
- Support all Node.js patterns and npm modules

## Usage

Expand All @@ -36,7 +37,20 @@ $ ncc run input.js

Build to a temporary folder and run the built JS file through Node.js, with source maps support for debugging.

### Node.js
### With TypeScript

The only requirement is to point `ncc` to `.ts` or `.tsx` files. A `tsconfig.json`
file is necessary. Most likely you want to indicate `es2015` support:

```json
{
"compilerOptions": {
"target": "es2015"
}
}
```

### Programmatically From Node.js

```js
require('@zeit/ncc')('/path/to/input', {
Expand Down

0 comments on commit 2ca4a69

Please sign in to comment.