typescript を使用した AngularJs 2 プロジェクトの開発環境として Atom を使用しています。typescript をサポートするために、atom に atom-typescript プラグインを追加しました。Atom は、.ts ファイルごとに個別の .js ファイルを生成しています。すべての .ts ファイルに対して単一の .js ファイルを生成したかったのです。そのため、tsconfig.json 内の comilerOptions の下に outFile 設定を追加しました。私の tsconfig.json は以下の通りです。
{
"compilerOptions": {
"target": "ES5",
"module": "system",
"moduleResolution": "node",
"sourceMap": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"outFile": "./js/Deployment/single.js"
},
"exclude": [
"node_modules"
]
}
問題ないように見えますが、プロジェクトをコンパイルすると、指定された場所に空の single.js ファイルが生成されます。ここで何が欠けているのか理解できません。atom-typescript バージョン 8.2.0 をインストールしました。
私のpackage.jsonは以下の通りです。
{
"name": "Pro1",
"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",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"systemjs": "0.19.6",
"zone.js": "0.5.10"
},
"devDependencies": {
"concurrently": "^1.0.0",
"lite-server": "^1.3.1",
"typescript": "^1.7.3"
}
}