diff --git a/demos/web-editor/web/package.json b/demos/web-editor/web/package.json index aa7b70e7..43ae9220 100644 --- a/demos/web-editor/web/package.json +++ b/demos/web-editor/web/package.json @@ -2,10 +2,11 @@ "scripts": { "build-wasm": "cd ../crate && wasm-pack build --target web --release", "build-web": "webpack --mode production", - "build-static": "cp src/index.html serve.json dist/", + "build-static": "sed \"s/VERSION/$(git log --pretty=format:'%h' -n 1)/g;s/MOD/$(git diff --quiet --exit-code || echo +)/g\" src/index.html > dist/index.html && grep 'Header add' ../README.md > dist/.htaccess", "dist": "npm run build-wasm && npm run build-web && npm run build-static", - "serve": "npm run dist && serve -c serve.json dist", - "format": "prettier . --write" + "serve": "npm run dist && serve -c ../serve.json dist", + "format": "prettier . --write", + "deploy": "rm dist/* && npm run dist && rsync -avz --delete -e ssh ./dist/ mkeeter@mattkeeter.com:mattkeeter.com/projects/fidget/demo" }, "dependencies": { "@lezer/lr": "^1.0.0", diff --git a/demos/web-editor/web/src/index.html b/demos/web-editor/web/src/index.html index 7aa68583..ee6db76c 100644 --- a/demos/web-editor/web/src/index.html +++ b/demos/web-editor/web/src/index.html @@ -39,6 +39,9 @@ flex: 50%; max-width: calc(min(100%, 512px)); } + div#version { + font-family: monospace; + }
@@ -57,6 +60,19 @@ ++ Version: + + VERSIONMOD +
+