We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fa9d6a commit f34b13dCopy full SHA for f34b13d
scripts/build.sh
@@ -1,6 +1,10 @@
1
#!/bin/bash
2
tsc --project tsconfig-build.json
3
ncc build ./build-tmp/index.js -o ./build
4
-cat ./build-tmp/codes.d.ts >> ./build-tmp/index.d.ts
5
-mv ./build-tmp/index.d.ts ./build
+cat ./build-tmp/index.d.ts >> ./build-tmp/codes.d.ts
+# Because we are concatting .d.ts files, we need to remove all imports of codes.ts from index.ts
6
+sed -i.old '/^import/d' ./build-tmp/codes.d.ts
7
+# as well as exports that already exist within codes.ts
8
+sed -i.old '/^export { StatusCodes, ReasonPhrases, }/d;' ./build-tmp/codes.d.ts
9
+mv ./build-tmp/codes.d.ts ./build/index.d.ts
10
rm -rf ./build-tmp
0 commit comments