公開したい typescript プロジェクトがあります。すべての js ファイルを build というディレクトリに生成し、すべての宣言ファイルをdeclaration というディレクトリに生成します。公開したバージョンに .ts ファイルを含めたくありません。 gulpを使用せずにこれを行うにはどうすればよいですか?
ここに私の tsconfig.json があります
{
"compilerOptions": {
"target": "es6",
"lib": ["es6", "dom"],
"types": ["reflect-metadata"],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"outDir": "build",
"declarationDir": "declaration"
},
"exclude": [
"node_modules"
]
}
そして私のpackage.json:
{
"name": "data-layer",
"version": "1.1.4",
"description": "data access layer",
"main": "./build/index.js",
"types": "./declaration/index.d.ts",
...