-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2335cf6
commit f8bcc28
Showing
6 changed files
with
12 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
#!/bin/bash | ||
rm -rf ./build | ||
rm -rf ./build-tmp | ||
tsc --project tsconfig-build.json | ||
ncc build ./build-tmp/index.js -o ./build/cjs | ||
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 | ||
sed -i.old '/^import/d' ./build-tmp/codes.d.ts | ||
# as well as exports that already exist within codes.ts | ||
sed -i.old '/^export { StatusCodes, ReasonPhrases, }/d;' ./build-tmp/codes.d.ts | ||
mv ./build-tmp/codes.d.ts ./build/cjs/index.d.ts | ||
rm -rf ./build-tmp | ||
tsc --project tsconfig-build.json | ||
mv ./build-tmp ./build/es/ | ||
tsc --project tsconfig-cjs.json | ||
tsc --project tsconfig-es.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"resolveJsonModule": false, | ||
"outDir": "./build/es/" | ||
}, | ||
"extends": "./tsconfig.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters