From 651a1107d1363f38e3ff70520b1ce3b6bb647766 Mon Sep 17 00:00:00 2001 From: sstent Date: Sun, 15 Feb 2026 15:27:51 -0800 Subject: [PATCH] Align project structure with silverbullet-plug-template - Rename deno.jsonc to deno.json and update build tasks - Add PLUG.md for SB v2 installation - Update .gitignore to include .plug.js files - Update README.md with new installation instructions - Simplify GitHub workflow --- .github/workflows/publish.yml | 6 ------ .gitignore | 1 - .vscode/settings.json | 2 +- PLUG.md | 6 ++++++ README.md | 20 +++++++------------- deno.json | 25 +++++++++++++++++++++++++ deno.jsonc | 25 ------------------------- 7 files changed, 39 insertions(+), 46 deletions(-) create mode 100644 PLUG.md create mode 100644 deno.json delete mode 100644 deno.jsonc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d5eb5c5..def42b0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,12 +19,6 @@ jobs: deno-version: v2.x - - name: Install SilverBullet CLI - run: | - # Install the CLI directly from the main source entry point - deno install --global -f -A --name silverbullet https://raw.githubusercontent.com/silverbulletmd/silverbullet/main/source/main.ts - echo "$HOME/.deno/bin" >> $GITHUB_PATH - - name: Build Plug run: deno task build diff --git a/.gitignore b/.gitignore index a217a22..fd0b6e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ deno.lock -*.plug.js test_space .env diff --git a/.vscode/settings.json b/.vscode/settings.json index 9968829..d7ccbb9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "deno.enable": true, "editor.formatOnSave": true, - "deno.config": "deno.jsonc" + "deno.config": "deno.json" } diff --git a/PLUG.md b/PLUG.md new file mode 100644 index 0000000..2ebe674 --- /dev/null +++ b/PLUG.md @@ -0,0 +1,6 @@ +| name | Library/Maarrk/icalendar/PLUG | +| --- | --- | +| tags | meta/library | +| files | icalendar.plug.js | + +iCalendar sync plug for SilverBullet. diff --git a/README.md b/README.md index 9a2c4de..3ac4a8e 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ It reads external [iCalendar](https://en.wikipedia.org/wiki/ICalendar) data, als ## Installation -Run the {[Plugs: Add]} command in SilverBullet and add paste this URI into the dialog box: +Run the {[Library: Install]} command and paste the following URL: +`https://github.com/Maarrk/silverbullet-icalendar/blob/main/PLUG.md` -``` -ghr:Maarrk/silverbullet-icalendar -``` +Alternatively, you can use the older way with the {[Plugs: Add]} command: +`ghr:Maarrk/silverbullet-icalendar` Then run the {[Plugs: Update]} command and off you go! @@ -92,25 +92,19 @@ If you find bugs, report them on the [issue tracker on GitHub](https://github.co ### Building from source -To build this plug, make sure you have [SilverBullet installed](https://silverbullet.md/Install). Then, build the plug with: +To build this plug, you need [Deno](https://deno.land/) installed. Then, build the plug with: ```shell deno task build ``` -Or to watch for changes and rebuild automatically +Or to watch for changes and rebuild automatically: ```shell deno task watch ``` -Then, copy the resulting `.plug.js` file into your space's `_plug` folder. Or build and copy in one command: - -```shell -deno task build && cp *.plug.js /my/space/_plug/ -``` - -SilverBullet will automatically sync and load the new version of the plug (or speed up this process by running the {[Sync: Now]} command). +The compiled plug will be written to `icalendar.plug.js`. This file is tracked by Git in this repository to allow for easy installation via the `PLUG.md` file. ## License diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..3a752b4 --- /dev/null +++ b/deno.json @@ -0,0 +1,25 @@ +{ + "tasks": { + "build": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/edge/plug-compile.js -c deno.json icalendar.plug.yaml", + "watch": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/edge/plug-compile.js -c deno.json icalendar.plug.yaml -w", + "debug": "deno run -A https://github.com/silverbulletmd/silverbullet/releases/download/edge/plug-compile.js -c deno.json icalendar.plug.yaml --debug" + }, + "lint": { + "rules": { + "exclude": [ + "no-explicit-any" + ] + } + }, + "fmt": { + "exclude": [ + "*.md", + "**/*.md", + "*.plug.js" + ] + }, + "imports": { + "@silverbulletmd/silverbullet": "jsr:@silverbulletmd/silverbullet@^2.3.0", + "ts-ics": "npm:ts-ics@2.4.0" + } +} diff --git a/deno.jsonc b/deno.jsonc deleted file mode 100644 index 0a481cf..0000000 --- a/deno.jsonc +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tasks": { - "build": "silverbullet plug:compile -c deno.jsonc icalendar.plug.yaml", - "build:debug": "silverbullet plug:compile -c deno.jsonc icalendar.plug.yaml --debug", - "watch": "silverbullet plug:compile -c deno.jsonc icalendar.plug.yaml -w" - }, - "lint": { - "rules": { - "exclude": [ - "no-explicit-any" - ] - } - }, - "fmt": { - "exclude": [ - "*.md", - "**/*.md", - "*.plug.js" - ] - }, - "imports": { - "@silverbulletmd/silverbullet": "jsr:@silverbulletmd/silverbullet@^2.0.0", - "ts-ics": "npm:ts-ics@2.4.0" - } -} \ No newline at end of file