From 2ca4a6931ba15ce85c60921905f7516464984d7a Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sun, 2 Dec 2018 21:09:38 -0800 Subject: [PATCH] add readme --- readme.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index d22444f55..ec0159066 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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', {