首页 > 其他 > 详细

[TypeScript] Configuring a New TypeScript Project

时间:2016-06-09 06:20:07      阅读:217      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!