mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 03:23:03 +00:00
Prepare for netlify
This commit is contained in:
parent
1f6bada107
commit
f62bc1e4c5
4 changed files with 16 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
/target
|
||||
/static
|
||||
/public
|
||||
/*.tgz
|
||||
|
|
15
build.sh
15
build.sh
|
@ -11,14 +11,19 @@ if ! [ -f core.tgz ]; then
|
|||
fi
|
||||
|
||||
# cleanup
|
||||
mkdir -p static
|
||||
rm -fR static/.gitignore static/*
|
||||
mkdir -p public
|
||||
rm -fR public/.gitignore public/*
|
||||
|
||||
# copy index.html
|
||||
cp static/index.html public/
|
||||
|
||||
# download blueprint css
|
||||
bsdtar xOf core.tgz package/lib/css/blueprint.css > public/blueprint.css
|
||||
|
||||
# build
|
||||
bsdtar xOf core.tgz package/lib/css/blueprint.css > static/blueprint.css
|
||||
wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./static "${options[@]}" "$@"
|
||||
wasm-pack build --no-typescript --target web --out-name wasm --out-dir ./public "${options[@]}" "$@"
|
||||
rc=$?
|
||||
|
||||
rm -fR static/{.gitignore,package.json}
|
||||
rm -fR public/{.gitignore,package.json,README.md}
|
||||
|
||||
exit $rc
|
||||
|
|
3
netlify.toml
Normal file
3
netlify.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[build]
|
||||
publish = "public"
|
||||
command = "./build.sh"
|
|
@ -3,10 +3,10 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<script type="module">
|
||||
import init from "/static/wasm.js";
|
||||
import init from "/wasm.js";
|
||||
init();
|
||||
</script>
|
||||
<link rel="stylesheet" href="/static/blueprint.css">
|
||||
<link rel="stylesheet" href="/blueprint.css">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
Loading…
Reference in a new issue