Basic typescript project
- Node and npm, which are bundled in one installer that can be found on http://nodejs.org/
- Run
npm installto install dependencies.
- Write code in
src/ - Use import and export statements to split up your javascript/typescript code.
src/main.tsorsrc/main.jsis the file that will be executed first with this setup. Other files are only executed by importing these files.
- Make sure
npm startis running. - After compiling without errors, an (updated) js file will appear in
dist/main.js. This is your export file and contains all code that is consumed bysrc/main.tsorsrc/main.js. Thedist/main.jsfile is your final product.
Enjoy!