Skip to content

Commit e7fa2db

Browse files
committed
refactor: update build script
1 parent b7ff114 commit e7fa2db

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
function BUNDLE {
55
echo "Microbundling..."
6-
rm -rf bundle
7-
microbundle build -i src/index.ts -o bundle/ --name use-restate --compress false --sourcemap false --target es5
8-
mv bundle/index.d.ts index.d.ts
9-
mv bundle/shallowEqual.d.ts shallowEqual.d.ts
6+
rm -rf dist
7+
yarn bundle
8+
mv dist/index.d.ts index.d.ts
9+
mv dist/shallowEqual.d.ts shallowEqual.d.ts
1010
echo "Microbundling done."
1111
}
1212

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "use-restate",
33
"version": "0.0.13",
44
"main": "dist/use-restate.js",
5-
"module": "dist/use-restate.es.js",
5+
"umd:main": "dist/use-restate.umd.js",
6+
"module": "dist/use-restate.m.js",
67
"repository": {
78
"type": "git",
89
"url": "git+https://github.com/animify/useRestate.git"
@@ -19,6 +20,7 @@
1920
"license": "MIT",
2021
"scripts": {
2122
"start": "parcel ./example/index.html",
23+
"bundle": "microbundle build -i src/index.ts -o dist/ --name use-restate --compress false --sourcemap false",
2224
"build": "sh ./build.sh",
2325
"prepublishOnly": "yarn build",
2426
"release": "changelog && git push --follow-tags && yarn publish --access public --non-interactive",
@@ -46,7 +48,7 @@
4648
"typescript": "^3.2.1"
4749
},
4850
"files": [
49-
"bundle",
51+
"dist",
5052
"index.d.ts",
5153
"shallowEqual.d.ts",
5254
"README.md",

0 commit comments

Comments
 (0)