我正在使用angular.io 网站上的5 分钟快速入门,其中包含如下文件结构:
angular2-quickstart
 app
   app.component.ts
   boot.ts
 index.html
 license.md
 package.json
 tsconfig.json
tsconfig.json 是这样的代码块:
{
  "compilerOptions": {
    "target": "ES5",
    "module": "system",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },
  "exclude": [
    "node_modules"
  ]
} 
还有 package.json:
{
  "name": "angular2-quickstart",
  "version": "1.0.0",
  "scripts": {
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "start": "concurrent \"npm run tsc:w\" \"npm run lite\" "
  },
  "license": "ISC",
  "dependencies": {
    "angular2": "2.0.0-beta.0",
    "systemjs": "0.19.6",
    "es6-promise": "^3.0.2",
    "es6-shim": "^0.33.3",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.0",
    "zone.js": "0.5.10"
  },
  "devDependencies": {
    "concurrently": "^1.0.0",
    "lite-server": "^1.3.1",
    "typescript": "^1.7.3"
  }
}
我将 sourceMap 从 true 更改为 false,因此在代码编辑器中,不会再次生成映射文件,但仍然生成了 js 文件。
我只想处理 ts 文件,不想得到 js 和 js.map 文件的早午餐,我该怎么做才能将我所有的 ts 文件放在我的常规开发文件中,例如 app 文件夹以及所有 js 和 js。将文件映射到名为 dist 的文件夹中?
一个很好的例子可能是angular2-webpack-quickstart。但我不明白他们是怎么做到的?
任何建议如何做到这一点,当然不是手动。
谢谢,