【发布时间】:2016-06-10 07:42:51
【问题描述】:
我正在使用 typescript 创建一个 Angular2 应用程序,每次运行 npm start 时,我的所有 .ts 文件都会编译成 javascript 文件并放入目录中。有没有办法关掉这个。
package.json
{
"name": "angular-prac",
"version": "1.0.0",
"scripts": {
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"postinstall": "typings install"
},
"license": "ISC",
"dependencies": {
"angular2": "2.0.0-beta.7",
"systemjs": "0.19.22",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.2",
"zone.js": "0.5.15"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.1.0",
"typescript": "^1.7.5",
"typings":"^0.6.8"
}
}
【问题讨论】:
-
你能发布你的 npm 配置吗?如果我们不知道
npm start实际运行的是什么,就很难知道问题出在哪里。 -
我添加了 package.json,这就是你要找的
-
抱歉回复慢。我想我知道问题出在哪里 - 在下面发布了答案。
标签: typescript npm angular