chore: add tsconfig for builds

This commit is contained in:
Ricardo Arturo Cabral Mejia 2022-10-12 01:19:22 +00:00
parent 4b8905b470
commit e538697f0e
No known key found for this signature in database
GPG Key ID: 5931EBF43A650245
2 changed files with 34 additions and 4 deletions

View File

@ -7,19 +7,19 @@
"dev": "ts-node src/index.ts",
"dev:watch": "nodemon --watch src src/index.ts",
"clean": "rimraf ./dist",
"prebuild": "npm run lint",
"build": "npm run clean && tsc",
"build": "tsc --project tsconfig.build.json",
"build:check": "tsc --noEmit",
"lint": "eslint ./src ./test --ext .ts",
"lint:fix": "npm run lint -- --fix",
"db:migrate": "knex migrate:latest",
"db:migrate:rollback": "knex migrate:rollback",
"db:seed": "knex seed:run",
"start": "npm run build && node dist/index.js",
"start": "node dist/index.js",
"test": "mocha 'test/**/*.spec.ts'",
"test:watch": "npm run test -- --min --watch --watch-files src/**/*,test/**/*",
"cover": "nyc npm run test",
"cover:watch": "nyc npm run test"
"cover:watch": "nyc npm run test",
"docker:build": "docker build -t nostr-ts-relay ."
},
"repository": {
"type": "git",

30
tsconfig.build.json Normal file
View File

@ -0,0 +1,30 @@
{
"compilerOptions": {
"module": "CommonJS",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "ESNext",
"outDir": "./dist",
"moduleResolution": "Node",
"types": ["node", "mocha"],
"typeRoots": ["./node_modules/@types"],
"declarationMap": true,
"inlineSourceMap": false,
"inlineSources": false,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["ESNext"]
},
"ts-node": {
"transpileOnly": true
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
]
}