feat: chaining index ts for distribution

This commit is contained in:
Supan Adit Pratama 2024-10-29 08:20:33 +07:00
parent 5bb80ebe75
commit 4135a933f3
6 changed files with 14 additions and 13 deletions

View File

@ -9,6 +9,7 @@ test
.eslintrc.js .eslintrc.js
jsr.json jsr.json
mod.ts mod.ts
index.js
nest-cli.json nest-cli.json
package-lock.json package-lock.json
tsconfig.build.json tsconfig.build.json

View File

@ -1,9 +0,0 @@
require = require('esm')(module /*, options*/);
module.exports = {
// 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'),
};

1
index.ts Normal file
View File

@ -0,0 +1 @@
export * from './libs/index';

2
libs/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './prisma/src/index';
export * from './skeleton/src/index';

View File

@ -1,9 +1,14 @@
{ {
"name": "@aditama-labs/nest-autocrud", "name": "@aditama-labs/nest-autocrud",
"version": "0.0.3", "version": "0.0.5",
"description": "NestJS Auto CRUD Library", "description": "NestJS Auto CRUD Library",
"author": "Supan Adit Pratama", "author": "Supan Adit Pratama",
"license": "MIT", "license": "MIT",
"main": "dist/libs/index.js",
"publishConfig": {
"directory": "dist",
"access": "public"
},
"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",

View File

@ -10,12 +10,13 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"target": "es6", "target": "es6",
"sourceMap": false, "sourceMap": false,
"outDir": "./dist/libs", "outDir": "./dist",
"rootDir": ".",
"skipLibCheck": true, "skipLibCheck": true,
}, },
"include": [ "include": [
"libs/prisma/src/**/*", "index.ts",
"libs/skeleton/src/**/*" "libs/**/*",
], ],
"exclude": [ "exclude": [
"node_modules", "node_modules",