feat: export testing to different project

This commit is contained in:
Supan Adit Pratama 2024-10-29 01:36:26 +07:00
parent 4336074a18
commit f4542082a2
7 changed files with 57 additions and 7 deletions

View File

@ -1,4 +1,9 @@
require = require('esm')(module /*, options*/); require = require('esm')(module /*, options*/);
module.exports = { module.exports = {
...require('./dist/libs/skeleton'), // For npm run build:libs
...require('./dist/libs/skeleton/src'),
...require('./dist/libs/prisma/src'),
// For Prisma Only
// ...require('./dist/libs/prisma/prisma/src'),
// ...require('./dist/libs/prisma/skeleton/src'),
}; };

View File

@ -1,3 +1,4 @@
export * from './prisma.module'; export * from './prisma.module';
export * from './prisma.service'; export * from './prisma.service';
export * from './constants'; export * from './constants';
export * from './processes/list.process';

View File

@ -9,6 +9,7 @@ export class PrismaListProcess extends PrismaProcess implements ListProcess {
} }
result() { result() {
console.log('ASDASDASDASD');
return this.data; return this.data;
} }
} }

View File

@ -1,9 +1,25 @@
{ {
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"module": "commonjs",
"declaration": true, "declaration": true,
"outDir": "../../dist/libs/prisma" "noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": false,
"outDir": "../../dist/libs/prisma",
"skipLibCheck": true,
}, },
"include": ["src/**/*"], "include": [
"exclude": ["node_modules", "dist", "test", "**/*spec.ts"] "src/**/*"
],
"exclude": [
"node_modules",
"dist",
"test",
"**/*spec.ts"
]
} }

View File

@ -1,3 +1,2 @@
export * from './constants'; export * from './constants';
export * from './skeleton-crud.controller'; export * from './skeleton-crud.controller';

View File

@ -8,6 +8,8 @@
"scripts": { "scripts": {
"build": "nest build", "build": "nest build",
"build:lib:skeleton": "tsc -p libs/skeleton/tsconfig.lib.json", "build:lib:skeleton": "tsc -p libs/skeleton/tsconfig.lib.json",
"build:lib:prisma": "tsc -p libs/prisma/tsconfig.lib.json",
"build:libs": "tsc -p tsconfig.lib.json",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"libs/**/*.ts\"", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"libs/**/*.ts\"",
"start": "nest start", "start": "nest start",
"start:dev": "nest start --watch", "start:dev": "nest start --watch",

26
tsconfig.lib.json Normal file
View File

@ -0,0 +1,26 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": false,
"outDir": "./dist/libs",
"skipLibCheck": true,
},
"include": [
"libs/prisma/src/**/*",
"libs/skeleton/src/**/*"
],
"exclude": [
"node_modules",
"dist",
"test",
"**/*spec.ts"
]
}