Skip to content

Commit 4fb17ab

Browse files
committed
Reorganize build scripts into packages to fix htm/preact path
1 parent f790339 commit 4fb17ab

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
"umd:main": "dist/htm.umd.js",
77
"module": "dist/htm.mjs",
88
"scripts": {
9-
"build": "npm run -s build:main && npm run -s build:preact && npm run -s build:babel",
9+
"build": "npm run build:main && npm run build:preact && npm run build:babel",
1010
"build:main": "microbundle src/index.mjs -f es,umd --no-sourcemap --target web && microbundle src/cjs.mjs -f iife --no-sourcemap --target web",
11-
"build:preact": "microbundle src/integrations/preact/index.mjs -o preact/index.js -f es,umd --external preact,htm --no-sourcemap --target web && npm run -s copy:preact:static && npm run -s build:preact:standalone",
12-
"copy:preact:static": "cp src/integrations/preact/index.d.ts src/integrations/preact/package.json preact/",
13-
"build:preact:standalone": "microbundle src/integrations/preact/standalone.mjs -o preact/standalone.js -f es,umd --no-sourcemap --target web",
11+
"build:preact": "cd src/integrations/preact && npm run build",
1412
"build:babel": "cd packages/babel-plugin-htm && npm run build",
1513
"test": "eslint src/**/*.mjs test && npm run build && jest test",
1614
"release": "npm run build && git checkout --detach && git add -f babel dist preact && git commit -am \"$npm_package_version\" && git tag $npm_package_version && git push --tags && git checkout master"

src/integrations/preact/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
"name": "htm_preact",
33
"module": "index.mjs",
44
"main": "index.js",
5-
"unpkg": "standalone.js"
5+
"umd:main": "index.js",
6+
"unpkg": "standalone.js",
7+
"scripts": {
8+
"build": "npm run -s build:main && npm run -s build:standalone && npm run -s build:static",
9+
"build:main": "microbundle index.mjs -o ../../../preact/index.js -f es,umd --external preact,htm --no-sourcemap --target web",
10+
"build:static": "cp index.d.ts package.json ../../../preact/",
11+
"build:standalone": "microbundle standalone.mjs -o ../../../preact/standalone.js -f es,umd --no-sourcemap --target web"
12+
}
613
}

0 commit comments

Comments
 (0)