Hacker News new | ask | show | jobs
by twistedpair 1891 days 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

2 comments

What mystery meat is in that tsconfig.json though?
tsc doesn't bundle, or resolve imports, or transpile for cross browser though, does it?
Using 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.