fix: exclude release bundles from npm publish
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
"build": "tsc -p tsconfig.build.json",
|
"build": "tsc -p tsconfig.build.json",
|
||||||
"build:native-bundle": "node ./scripts/build-native-bundle.mjs",
|
"build:native-bundle": "node ./scripts/build-native-bundle.mjs",
|
||||||
"dev": "tsx src/index.ts",
|
"dev": "tsx src/index.ts",
|
||||||
"prepack": "npm run build && node ./scripts/prepare-runtime-workspace.mjs",
|
"prepack": "node ./scripts/clean-publish-artifacts.mjs && npm run build && node ./scripts/prepare-runtime-workspace.mjs",
|
||||||
"start": "tsx src/index.ts",
|
"start": "tsx src/index.ts",
|
||||||
"start:dist": "node ./bin/feynman.js",
|
"start:dist": "node ./bin/feynman.js",
|
||||||
"test": "node --import tsx --test --test-concurrency=1 tests/*.test.ts",
|
"test": "node --import tsx --test --test-concurrency=1 tests/*.test.ts",
|
||||||
|
|||||||
8
scripts/clean-publish-artifacts.mjs
Normal file
8
scripts/clean-publish-artifacts.mjs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { rmSync } from "node:fs";
|
||||||
|
import { resolve } from "node:path";
|
||||||
|
|
||||||
|
const appRoot = resolve(import.meta.dirname, "..");
|
||||||
|
const releaseDir = resolve(appRoot, "dist", "release");
|
||||||
|
|
||||||
|
rmSync(releaseDir, { recursive: true, force: true });
|
||||||
|
console.log("[feynman] removed dist/release before npm pack/publish");
|
||||||
Reference in New Issue
Block a user