From c31133c963adda3c4783419a3959ab4f23baf779 Mon Sep 17 00:00:00 2001 From: Supan Adit Pratama Date: Tue, 29 Oct 2024 09:48:50 +0700 Subject: [PATCH] chore: change to package instead of dist --- .gitignore | 1 + .npmignore | 1 + index.js | 2 +- index.ts | 2 +- libs/tsconfig.lib.json | 27 +++++++++++++++++++++++++++ package.json | 4 ++-- tsconfig.lib.json | 2 +- 7 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 libs/tsconfig.lib.json diff --git a/.gitignore b/.gitignore index 4b56acf..37f2eb0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /dist /node_modules /build +/plugins # Logs logs diff --git a/.npmignore b/.npmignore index f669042..d082e1a 100644 --- a/.npmignore +++ b/.npmignore @@ -3,6 +3,7 @@ libs sample test e2e +/dist /src /prisma /mod.ts diff --git a/index.js b/index.js index 6d38cea..349b681 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ require = require('esm')(module /*, options*/); module.exports = { - ...require('./dist'), + ...require('./plugins'), }; diff --git a/index.ts b/index.ts index 5703fb5..460ab6b 100644 --- a/index.ts +++ b/index.ts @@ -1 +1 @@ -export * from './dist'; +export * from './plugins'; diff --git a/libs/tsconfig.lib.json b/libs/tsconfig.lib.json new file mode 100644 index 0000000..a9e924e --- /dev/null +++ b/libs/tsconfig.lib.json @@ -0,0 +1,27 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "noImplicitAny": false, + "removeComments": true, + "noLib": false, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es6", + "sourceMap": false, + "outDir": "../plugins", + "skipLibCheck": true, + }, + "include": [ + "index.ts", + "prisma/**/*", + "skeleton/**/*", + ], + "exclude": [ + "node_modules", + "dist", + "test", + "**/*spec.ts", + ] +} \ No newline at end of file diff --git a/package.json b/package.json index e2c4f24..a1aacd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aditama-labs/nest-autocrud", - "version": "0.0.10", + "version": "0.0.11", "description": "NestJS Auto CRUD Library", "author": "Supan Adit Pratama", "license": "MIT", @@ -13,7 +13,7 @@ "build": "nest build", "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", + "build:libs": "tsc -p libs/tsconfig.lib.json", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"libs/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", diff --git a/tsconfig.lib.json b/tsconfig.lib.json index 840ed6d..061773f 100644 --- a/tsconfig.lib.json +++ b/tsconfig.lib.json @@ -21,6 +21,6 @@ "node_modules", "dist", "test", - "**/*spec.ts" + "**/*spec.ts", ] } \ No newline at end of file