1
0
silverbullet/scripts/build_demo.sh

31 lines
833 B
Bash
Raw Normal View History

#!/bin/bash
2022-10-29 14:27:16 +00:00
echo "Install Deno"
# curl -fsSL https://deno.land/install.sh | sh
# export PATH=~/.deno/bin:$PATH
echo "Building silver bullet"
2022-10-29 14:27:16 +00:00
deno task build
echo "Cleaning website build dir"
rm -rf website_build
2022-09-13 06:46:30 +00:00
mkdir -p website_build/fs/_plug
echo "Copying silverbullet runtime files"
2022-10-29 14:27:16 +00:00
cp -r dist_bundle/web/* website_build/
cp -r dist_bundle/_plug/* website_build/fs/_plug/
echo "Copying netlify config files"
cp website/{_redirects,_headers} website_build/
echo "Copying website markdown files"
2022-09-13 06:46:30 +00:00
cp -r website/* website_build/fs/
rm website_build/fs/{_redirects,_headers}
echo "Generating file listing"
2022-10-29 14:27:16 +00:00
deno run -A scripts/generate_fs_list.ts > website_build/index.json
echo > website_build/empty.md
echo "Bundling..."
deno task bundle
cp dist/silverbullet.js website_build/
cp dist_bundle/web/global.plug.json website_build/