Skip to content

Commit 470e98a

Browse files
committed
Fix build script to copy assets and correct HTML paths for GitHub Pages
1 parent 21ddf64 commit 470e98a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"dev": "run-p watch serve",
66
"watch": "tsc -w",
77
"serve": "live-server --open=src/index.html",
8-
"build": "tsc"
8+
"build": "tsc && npm run copy-assets",
9+
"copy-assets": "cp src/styles.css dist/ && cp src/index.html dist/ && sed -i '' 's|../dist/index.js|./index.js|g' dist/index.html && sed -i '' 's|href=\"./styles.css\"|href=\"./styles.css\"|g' dist/index.html"
910
},
1011
"devDependencies": {
1112
"npm-run-all": "^4.1.5",

0 commit comments

Comments
 (0)