diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 2d16e0b..865dc04 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -24,7 +24,7 @@ jobs: with: registry-url: "https://registry.npmjs.org" - run: bun install - - run: bun run build + - run: bun run build:publish - run: bunx --bun npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index 1706898..6d1fa9e 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "scripts": { "test": "jest --silent --runInBand --forceExit", "build": "rimraf dist && tsc --build ./tsconfig.json", + "build:publish": "rimraf dist && tsc --build ./tsconfig.build.json", "watch": "tsc --watch", "prettier:fix": "prettier --write \"src/**/*.ts\"", "lint:fix": "eslint \"src/**/*.ts\"" diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..4a739b6 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": "./src" + }, + "include": ["src"], + "exclude": [ + "dist", + "build", + "node_modules", + "__tests__" + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 1d91737..6899123 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,6 @@ "declaration": true, "sourceMap": true, "outDir": "./dist", - "rootDir": "./src", "jsx": "react-jsx", "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, @@ -22,6 +21,6 @@ "exclude": [ "dist", "build", - "node_modules", + "node_modules" ] }