6 ms·
Is it really that hard? > npm init > npm i --save-dev typescript Add "build":"tsc" to your package.json "scripts" Add a tsconfig.json file > npm run build F
by twistedpair 5y ago
Is it really that hard?
> npm init
> npm i --save-dev typescript
Add "build":"tsc" to your package.json "scripts"
Add a tsconfig.json file
> npm run build
Finito - you've compiled a TS project to JS
- PetahNZ 5y agotsc doesn't bundle, or resolve imports, or transpile for cross browser though, does it?
- TechSupportJosh 5y agoUsing something like Parcel means it's usually as easy as adding parcel serve or parcel build to package.json and it handles the transpile, module resolution, bundling, tree shaking and hot reload for development.
- dboreham 5y agoWhat mystery meat is in that tsconfig.json though?