Basic typescript project
- Node and npm, which are bundled in one installer that can be found on http://nodejs.org/
- Run
npm install
to install dependencies.
- Write code in
src/
- Use import and export statements to split up your javascript/typescript code.
src/main.ts
orsrc/main.js
is the file that will be executed first with this setup. Other files are only executed by importing these files.
- Make sure
npm start
is 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.ts
orsrc/main.js
. Thedist/main.js
file is your final product.
Enjoy!