码迷,mamicode.com
首页 > 其他好文 > 详细

[TypeScript] Configuring a New TypeScript Project

时间:2016-06-09 06:20:25      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:

This lesson walks you through creating your first .tsconfig configuration file which will tell the TypeScript compiler how to treat your .ts files.

 

Init a config.json file:

tsc --init

 

tsconfig.json, will be created:

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "noImplicitAny": false,
        "sourceMap": false
    },
    "exclude": [
        "node_modules"
    ]
}

 

Previously, we nee to say:

tsc app.ts

to compile file, now, we don‘t need to do that, it will find ts files and compile when you run ‘tsc‘. notice, node_modules is excluded by default.

 

[TypeScript] Configuring a New TypeScript Project

标签:

原文地址:http://www.cnblogs.com/Answer1215/p/5571857.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!