I have a Typescript project that needs to be published. All generated JS files are stored in a directory named build, and declaration files in another directory called declaration. I do not want the .ts files to be included in the published version. Can anyone suggest a way to achieve this without using Gulp?
Below is my tsconfig.json configuration:
{
"compilerOptions": {
"target": "es6",
"lib": ["es6", "dom"],
"types": ["reflect-metadata"],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"outDir": "build",
"declarationDir": "declaration"
},
"exclude": [
"node_modules"
]
}
And here's an excerpt from my package.json file:
{
"name": "data-layer",
"version": "1.1.4",
"description": "Data access layer",
"main": "./build/index.js",
"types": "./declaration/index.d.ts",
...