Example of TypeScript builds and workflows. For the official examples go to https://www.typescriptlang.org/samples/index.html
- AMD modules in browser
- CommonJS with Browserify
- CommonJS with Browserify and Tsify
- CommonJS with Gulp task with Browseriy and Tsify
- CommonJS in Node
- SystemJS in browser
- Maven
- Webpack
- React app
- React app + Normal app
If you want to start a fresh npm project from scratch, here are the steps to follow:
mkdir myProject && cd myProject
mkdir src
(put your.ts
files here)mkdir dist
npm --init
npm install typescript --save-dev
node_modules/.bin/tsc --init
- Edit
tsconfig.json
- Run
node_modules/.bin/tsc