Disable background jobs on mobile

This commit is contained in:
Zef Hemel
2023-01-25 18:29:47 +01:00
parent ca8b8d9a84
commit bd152dd297
12 changed files with 139 additions and 101 deletions
-43
View File
@@ -1,43 +0,0 @@
#!/bin/bash
echo "Install Deno"
curl -fsSL https://deno.land/install.sh | sh
export PATH=~/.deno/bin:$PATH
echo "Generating version number..."
echo "export const version = '$(git rev-parse HEAD)';" > version.ts
echo "Building silver bullet"
deno task build
echo "Cleaning website build dir"
rm -rf website_build
mkdir -p website_build/fs/_plug
echo "Copying silverbullet runtime files"
cp -r dist_bundle/web/* website_build/
echo "And all plugs"
cp -r dist_bundle/_plug/* website_build/fs/_plug/
echo "And additional ones"
curl https://raw.githubusercontent.com/silverbulletmd/silverbullet-mermaid/main/mermaid.plug.json > website_build/fs/_plug/mermaid.plug.json
echo "But remove some plugs"
rm -rf website_build/fs/_plug/{directive,plugmd,publish,share}.plug.json
#echo "Copying netlify config files"
#cp website/{_redirects,_headers} website_build/
echo "Copying website content into fs/"
cp -r website/* website_build/fs/
rm website_build/fs/{_redirects,_headers}
echo "Copy website files another time into the root"
cp -r website/* website_build/
echo "Generating file listing"
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/
cp web/images/logo.ico website_build/
+30 -7
View File
@@ -1,20 +1,43 @@
#!/bin/bash
echo "Now building SilverBullet bundle"
echo "Install Deno"
curl -fsSL https://deno.land/install.sh | sh
export PATH=~/.deno/bin:$PATH
echo "Generating version number..."
echo "export const version = '$(git rev-parse HEAD)';" > version.ts
echo "Building..."
deno task build
deno task install
echo "Building silver bullet"
deno task build
echo "Cleaning website build dir"
rm -rf website_build
silverbullet publish --index -o website_build website
mkdir -p website_build/fs/_plug
echo "Copying silverbullet runtime files"
cp -r dist_bundle/web/* website_build/
echo "And all plugs"
cp -r dist_bundle/_plug/* website_build/fs/_plug/
echo "And additional ones"
curl https://raw.githubusercontent.com/silverbulletmd/silverbullet-mermaid/main/mermaid.plug.json > website_build/fs/_plug/mermaid.plug.json
echo "But remove some plugs"
rm -rf website_build/fs/_plug/{directive,plugmd,publish,share}.plug.json
#echo "Copying netlify config files"
#cp website/{_redirects,_headers} website_build/
echo "Copying website content into fs/"
cp -r website/* website_build/fs/
rm website_build/fs/{_redirects,_headers}
echo "Copy website files another time into the root"
cp -r website/* website_build/
echo "Generating file listing"
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/
cp dist_bundle/web/global.plug.json website_build/
cp web/images/logo.ico website_build/
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
echo "Now building SilverBullet bundle"
curl -fsSL https://deno.land/install.sh | sh
export PATH=~/.deno/bin:$PATH
echo "Generating version number..."
echo "export const version = '$(git rev-parse HEAD)';" > version.ts
echo "Building..."
deno task build
deno task install
rm -rf website_build
silverbullet publish --index -o website_build website
echo "Bundling..."
deno task bundle
cp dist/silverbullet.js website_build/
cp dist_bundle/web/global.plug.json website_build/
+1 -1
View File
@@ -18,7 +18,7 @@ for await (
const s = await Deno.stat(fullPath);
allFiles.push({
name: fullPath.substring(rootDir.length + 1),
lastModified: 0,
lastModified: Date.now(),
contentType: mime.getType(fullPath) || "application/octet-stream",
size: s.size,
perm: "rw",