dilluns, 28 d’agost del 2017

Typescript basic setup for webcomponents


Install globally TypeScript with
npm install -g typescript

create tsconfig

/customElements/typedelement $ tsc -init
message TS6071: Successfully created a tsconfig.json file.

Edit the tsconfig.json in the compile section set.

  "compilerOptions": {
    /* Basic Options */
    "target": "ES2015",

to develop and automatically compile tsc -w it will create a foo.js from each foo.ts.

Enjoy!!!

Cap comentari:

Publica un comentari a l'entrada