How to create tsconfig.json file in angular2 project?

I created one angular2 project using npm. I meant this link: Angular2 Tutorial

I successfully created the file package.jsonusing the command npm init. But I did not find any command to create the file tsconfig.json. I'm not sure if I should create this file using a command or using an editor? Thanks in advance.

+4
source share
2 answers

Calling the TypeScript compiler with a parameter initwill create a new one tsconfig.jsonin the current directory

tsc --init
+6
source

tsc TypeScript:

$ npm install -g typescript

:

$ tsc --init --experimentalDecorators
      --moduleResolution node --target ES5
      --sourceMap --module system --removeComments

, , Angular.io .

outDir rootDir, . , . tsconfig.json.

"emitDecoratorMetadata": true

, , Thierry

+5

Source: https://habr.com/ru/post/1626175/


All Articles