Align project structure with silverbullet-plug-template
Some checks failed
Build SilverBullet Plug / build (push) Failing after 11s

- 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
This commit is contained in:
2026-02-15 15:27:51 -08:00
parent daab3cf2f3
commit 651a1107d1
7 changed files with 39 additions and 46 deletions

View File

@@ -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

1
.gitignore vendored
View File

@@ -1,4 +1,3 @@
deno.lock
*.plug.js
test_space
.env

View File

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

6
PLUG.md Normal file
View File

@@ -0,0 +1,6 @@
| name | Library/Maarrk/icalendar/PLUG |
| --- | --- |
| tags | meta/library |
| files | icalendar.plug.js |
iCalendar sync plug for SilverBullet.

View File

@@ -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

25
deno.json Normal file
View File

@@ -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"
}
}

View File

@@ -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"
}
}