- to init run
npm install
(ornpm i
for short) to install dependencies (works on Node v14.15.1, we don't guarantee that for higher versions)
- to compile once run
npm run build
- to build and watch the project (so it recompiles on save) run
npm start
. this also starts a simple http server and auto reloads the browser window - typescript will compile and bundle into javascript in
dist/main.js
and this is then referenced inindex.html
- for linting i recommend
ms-vscode.vscode-typescript-tslint-plugin
vscode extension and then setting the following insettings.json
(F1 -> search for settings ->Preferences: Open settings (JSON)
)
"editor.codeActionsOnSave": {
"source.fixAll.tslint": true,
"source.organizeImports": true
}