-
Notifications
You must be signed in to change notification settings - Fork 90
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
4d02043
commit f740500
Showing
8 changed files
with
38 additions
and
18 deletions.
There are no files selected for viewing
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,17 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
## Build CJS | ||
yarn swc ./pkg -C module.type=commonjs -d dist/cjs --copy-files --strip-leading-paths | ||
## Build ESM | ||
yarn swc ./pkg -C module.type=es6 -d dist/esm --copy-files --strip-leading-paths | ||
|
||
## Copy types | ||
cp pkg/chopsticks_executor.d.ts dist/cjs/index.d.ts | ||
cp pkg/chopsticks_executor.d.ts dist/esm/index.d.ts | ||
|
||
## Make package CJS | ||
echo '{ "type": "commonjs" }' > dist/cjs/package.json | ||
## Make package ESM | ||
echo '{ "type": "module" }' > dist/esm/package.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
## Build CJS | ||
yarn swc ./src --config-file $(dirname "$0")/.cjsswcrc -d dist/cjs --copy-files --strip-leading-paths | ||
## Build ESM | ||
yarn swc ./src --config-file $(dirname "$0")/.esmswcrc -d dist/esm --copy-files --strip-leading-paths | ||
|
||
## Build types | ||
yarn tsc -p tsconfig.json --declarationDir dist/cjs | ||
yarn tsc -p tsconfig.json --declarationDir dist/esm | ||
|
||
## Make package CJS | ||
echo '{ "type": "commonjs" }' > dist/cjs/package.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
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
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