tutorials
, typescript
npm install -g typescript
create a new typescript workspace folder. This is where all of your TS files will live.
make a new directory in your TS workspace and open VSCode (code .
)
run git init
and npm init
run npm install
run npm install --save-dev lite-server
run npm start
package.json
inside of "scripts" shell, add
{"start": "lite-server", ...}
โ set your path:"main": app.js
<script src="app.js" defer></script>
app.ts
. write TS code, and compile using the command $tsc app.ts
run $tsc --init
run $tsc --watch
include or exclude files in your newly created tsconfig
shell.
outDir: "dist"
and rootDir: "src"
in your tsconfig.json file.