diff --git a/.npmignore b/.npmignore index c631500..3f32e6e 100644 --- a/.npmignore +++ b/.npmignore @@ -9,6 +9,7 @@ test .eslintrc.js jsr.json mod.ts +index.js nest-cli.json package-lock.json tsconfig.build.json diff --git a/index.js b/index.js deleted file mode 100644 index db0e954..0000000 --- a/index.js +++ /dev/null @@ -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'), -}; diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..704a425 --- /dev/null +++ b/index.ts @@ -0,0 +1 @@ +export * from './libs/index'; diff --git a/libs/index.ts b/libs/index.ts new file mode 100644 index 0000000..3efbec2 --- /dev/null +++ b/libs/index.ts @@ -0,0 +1,2 @@ +export * from './prisma/src/index'; +export * from './skeleton/src/index'; diff --git a/package.json b/package.json index d496ca1..31e7ea4 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,14 @@ { "name": "@aditama-labs/nest-autocrud", - "version": "0.0.3", + "version": "0.0.5", "description": "NestJS Auto CRUD Library", "author": "Supan Adit Pratama", "license": "MIT", + "main": "dist/libs/index.js", + "publishConfig": { + "directory": "dist", + "access": "public" + }, "scripts": { "build": "nest build", "build:lib:skeleton": "tsc -p libs/skeleton/tsconfig.lib.json", diff --git a/tsconfig.lib.json b/tsconfig.lib.json index e582e7d..6bf7ce4 100644 --- a/tsconfig.lib.json +++ b/tsconfig.lib.json @@ -10,12 +10,13 @@ "experimentalDecorators": true, "target": "es6", "sourceMap": false, - "outDir": "./dist/libs", + "outDir": "./dist", + "rootDir": ".", "skipLibCheck": true, }, "include": [ - "libs/prisma/src/**/*", - "libs/skeleton/src/**/*" + "index.ts", + "libs/**/*", ], "exclude": [ "node_modules",