-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Colin Finger
committed
Jan 14, 2025
1 parent
baa90fe
commit 286bff4
Showing
1 changed file
with
20 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DIST=dist | ||
|
||
TMPDIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') | ||
npx tsc --declaration --emitDeclarationOnly --outDir $TMPDIR | ||
|
||
rm -rf $DIST | ||
mkdir $DIST | ||
mv $TMPDIR/src/* $DIST | ||
rm -rf $TMPDIR | ||
npx babel src --out-dir $DIST --copy-files --no-copy-ignored --extensions .ts --source-maps | ||
npx webpack -- --mode $1 | ||
# https://github.com/webpack-contrib/mini-css-extract-plugin/issues/151 | ||
rm -rf $DIST/dist/*.css.js $DIST/dist/*.css.js.* | ||
cp package.json $DIST | ||
cp README.md $DIST | ||
cp LICENSE $DIST | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DIST=dist | ||
|
||
TMPDIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') | ||
npx tsc --declaration --emitDeclarationOnly --outDir $TMPDIR | ||
|
||
rm -rf $DIST | ||
mkdir $DIST | ||
mv $TMPDIR/src/* $DIST | ||
rm -rf $TMPDIR | ||
npx babel src --out-dir $DIST --copy-files --no-copy-ignored --extensions .ts --source-maps | ||
npx webpack -- --mode $1 | ||
# https://github.com/webpack-contrib/mini-css-extract-plugin/issues/151 | ||
rm -rf $DIST/dist/*.css.js $DIST/dist/*.css.js.* | ||
cp package.json $DIST | ||
cp README.md $DIST | ||
cp LICENSE $DIST |