diff --git a/.gitignore b/.gitignore index bac320e..71584b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /target -/static +/public /*.tgz diff --git a/build.sh b/build.sh index 253af13..6a3a099 100755 --- a/build.sh +++ b/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 diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..73688ec --- /dev/null +++ b/netlify.toml @@ -0,0 +1,3 @@ +[build] +publish = "public" +command = "./build.sh" diff --git a/index.html b/static/index.html similarity index 72% rename from index.html rename to static/index.html index 4f7a536..f248cda 100644 --- a/index.html +++ b/static/index.html @@ -3,10 +3,10 @@ - +