Reputation: 1226
I have a typescript project that I want to publish it, I generate all the js files in a directory called build and all declaration files in a directory called declaration, I don't want to include .ts files in my published version I was wonder how can I do this without using gulp?
here is my 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"
]
}
and my package.json:
{
"name": "data-layer",
"version": "1.1.4",
"description": "data access layer",
"main": "./build/index.js",
"types": "./declaration/index.d.ts",
...
Upvotes: 2
Views: 736