Use the deno-based build

This commit is contained in:
Zef Hemel
2022-10-15 20:14:55 +02:00
parent 5f9bde8451
commit cb79d165a5
9 changed files with 26 additions and 11596 deletions

2
.gitignore vendored
View File

@@ -1,2 +0,0 @@
*.plug.json
node_modules

1
.nvmrc
View File

@@ -1 +0,0 @@
18

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"deno.enable": true,
"editor.formatOnSave": true,
"deno.config": "deno.jsonc"
}

7
deno.jsonc Normal file
View File

@@ -0,0 +1,7 @@
{
"importMap": "import_map.json",
"tasks": {
"build": "plugos-bundle --importmap import_map.json hello.plug.yaml",
"watch": "plugos-bundle -w --importmap import_map.json hello.plug.yaml"
}
}

View File

@@ -1,7 +1,9 @@
name: hello-world
version: 0.1
imports:
- https://get.silverbullet.md/global.plug.json
functions:
helloWorld:
path: "./hello.ts:helloWorld"
command:
name: "Say hello"
name: "Say hello"

View File

@@ -1,4 +1,4 @@
import { flashNotification } from "@silverbulletmd/plugos-silverbullet-syscall/editor";
import { editor } from "$sb/silverbullet-syscall/mod.ts";
const loneRangerQuotes = [
"Hi-Yo! Silver",
@@ -8,5 +8,7 @@ const loneRangerQuotes = [
];
export async function helloWorld() {
await flashNotification(loneRangerQuotes[Math.floor(Math.random() * loneRangerQuotes.length)]);
await editor.flashNotification(
loneRangerQuotes[Math.floor(Math.random() * loneRangerQuotes.length)],
);
}

7
import_map.json Normal file
View File

@@ -0,0 +1,7 @@
{
"imports": {
"$sb/": "https://deno.land/x/silverbullet@0.1.2/plug-api/",
"handlebars": "https://esm.sh/handlebars",
"yaml": "https://deno.land/std/encoding/yaml.ts"
}
}

11574
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +0,0 @@
{
"name": "hello_world",
"version": "0.0.1",
"author": "A Lone Ranger",
"scripts": {
"build": "plugos-bundle --exclude yaml handlebars @lezer/lr -- helloWorld.plug.yaml",
"start": "plugos-bundle -w --exclude yaml handlebars @lezer/lr -- helloWorld.plug.yaml"
},
"dependencies": {
"@silverbulletmd/plugos-silverbullet-syscall": "^0.0.26",
"@silverbulletmd/plugs": "^0.0.26"
},
"devDependencies": {
"@plugos/plugos": "^0.0.26"
}
}