From eb3bc73086f2aec19133b2abdb08988ee2a66d4e Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Sat, 9 Nov 2024 22:39:15 +0700 Subject: [PATCH] build: remove support for packaging the library (#4) * build: remove support for packaging library Signed-off-by: Alfi Maulana * build: configure TypeScript to only build bin script without declarations Signed-off-by: Alfi Maulana --------- Signed-off-by: Alfi Maulana --- .github/workflows/build.yaml | 13 +++---------- .gitignore | 2 -- package.json | 6 ------ tsconfig.json | 4 +--- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 096d66b..d078d42 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,15 +28,8 @@ jobs: - name: Check Lint run: yarn lint + - name: Build Library + run: yarn build + - name: Test Library run: yarn test - - - name: Package Library - run: yarn pack - - - name: Upload Package - uses: actions/upload-artifact@v4.4.3 - with: - path: package.tgz - if-no-files-found: error - overwrite: true diff --git a/.gitignore b/.gitignore index 19637e2..3d3cb92 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,3 @@ dist/ node_modules/ - -package.tgz diff --git a/package.json b/package.json index 3893231..6d0baf9 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,11 @@ "name": "my_bot", "private": true, "type": "module", - "main": "dist/index.js", - "types": "dist/index.d.ts", "bin": "dist/bin.js", - "files": [ - "dist" - ], "scripts": { "build": "tsc", "format": "prettier --write --cache .", "lint": "eslint", - "prepack": "tsc", "test": "jest" }, "dependencies": { diff --git a/tsconfig.json b/tsconfig.json index 583e243..82bc037 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,9 @@ { - "include": ["src"], - "exclude": ["**/*.test.*"], + "include": ["src/bin.ts"], "compilerOptions": { "exactOptionalPropertyTypes": true, "strict": true, "module": "node16", - "declaration": true, "outDir": "dist", "esModuleInterop": true, "target": "es2022",