Skip to content

Commit 3024fbd

Browse files
authored
Merge pull request #9 from DanHulton/feature/build_fix
Fix build-esm and build-cjs not replacing existing build directory.
2 parents 9c9bbc6 + b29d02d commit 3024fbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"prebuild": "npm run lint",
4242
"prepublishOnly": "tsc -p tsconfig.json",
4343
"build": "npm run build-esm && npm run build-cjs",
44-
"build-esm": "tsc -p tsconfig.json --module es2022 --outDir build/esm/ && echo '{\"type\": \"module\"}' > build/esm/package.json",
45-
"build-cjs": "tsc -p tsconfig.json --module commonjs --outDir build/cjs/ && shx echo '{\"type\": \"commonjs\"}' > build/cjs/package.json",
44+
"build-esm": "rm -rf build/esm && tsc -p tsconfig.json --module es2022 --outDir build/esm/ && echo '{\"type\": \"module\"}' > build/esm/package.json",
45+
"build-cjs": "rm -rf build/cjs && tsc -p tsconfig.json --module commonjs --outDir build/cjs/ && shx echo '{\"type\": \"commonjs\"}' > build/cjs/package.json",
4646
"build:watch": "tsc -w -p tsconfig.json",
4747
"lint": "eslint . --ext .ts --ext .mts",
4848
"test": "mocha -r ts-node/register ./test/**/*.ts"
@@ -55,4 +55,4 @@
5555
],
5656
"author": "Ong Teck Wu",
5757
"license": "Apache-2.0"
58-
}
58+
}

0 commit comments

Comments
 (0)