-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TypeScript): fix export of type definitions
This PR fixes #1075
- Loading branch information
1 parent
74b7106
commit eb85869
Showing
5 changed files
with
67 additions
and
7 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
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,21 @@ | ||
#!/bin/bash | ||
|
||
echo 'Building cjs ...' | ||
|
||
cross-env \ | ||
NODE_ENV=production \ | ||
BABEL_ENV=cjs \ | ||
babel ./src \ | ||
--extensions '.cjs,.js,.ts,.tsx' \ | ||
--keep-file-extension \ | ||
--config-file ./babel.config.js \ | ||
--out-dir ./build/cjs \ | ||
--copy-files \ | ||
--no-copy-ignored \ | ||
--ignore 'src/esm,src/umd,src/core,**/*.test.js,**/__tests__/**/*,**/*.d.ts' | ||
|
||
echo 'Building cjs done!' | ||
|
||
echo 'Copy .d.ts files ...' | ||
|
||
cd ./src && find . -name '*.d.ts' | cpio -p -dumv ../build/cjs && cd ../ |
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,21 @@ | ||
#!/bin/bash | ||
|
||
echo 'Building es ...' | ||
|
||
cross-env \ | ||
NODE_ENV=production \ | ||
BABEL_ENV=es \ | ||
babel ./src \ | ||
--extensions '.js,.ts,.tsx' \ | ||
--keep-file-extension \ | ||
--config-file ./babel.config.js \ | ||
--out-dir ./build/es \ | ||
--copy-files \ | ||
--no-copy-ignored \ | ||
--ignore 'src/cjs,src/esm,src/umd,src/core,**/*.test.js,**/__tests__/**/*,**/*.d.ts' | ||
|
||
echo 'Building es done!' | ||
|
||
echo 'Copy .d.ts files ...' | ||
|
||
cd ./src && find . -name '*.d.ts' | cpio -p -dumv ../build/es && cd ../ |
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,21 @@ | ||
#!/bin/bash | ||
|
||
echo 'Building esm ...' | ||
|
||
cross-env \ | ||
NODE_ENV=production \ | ||
BABEL_ENV=esm \ | ||
babel ./src \ | ||
--extensions '.js,.ts,.tsx' \ | ||
--keep-file-extension \ | ||
--config-file ./babel.config.js \ | ||
--out-dir ./build/esm \ | ||
--copy-files \ | ||
--no-copy-ignored \ | ||
--ignore 'src/cjs,src/esm,src/umd,src/core,**/*.test.js,**/__tests__/**/*,**/*.d.ts' | ||
|
||
echo 'Building esm done!' | ||
|
||
echo 'Copy .d.ts files ...' | ||
|
||
cd ./src && find . -name '*.d.ts' | cpio -p -dumv ../build/esm && cd ../ |