forked from GitHubMirrors/silverbullet-icalendar
initial commit
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.plug.json
|
||||||
|
node_modules
|
||||||
24
README.md
Normal file
24
README.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
# SilverBullet plug for saying hello to the user
|
||||||
|
|
||||||
|
A well behaved plug that will greet your users.
|
||||||
|
|
||||||
|
## Wait, SilverBullet?
|
||||||
|
|
||||||
|
If you don't know what it is, check its [webpage](https://silverbullet.md), but if
|
||||||
|
you want me to spoil the fun: it is an extensible note taking app with markdown and plain files at its core
|
||||||
|
(well... there is a bit of magic in there too, but what good it would be without a little magic?)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Open (`cmd+k`) your `PLUGS` note in SilverBullet and add this plug to the list:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- https://github.com/Willyfrog/silverbullet-plug-example/releases/download/v0.1/helloworld.plug.json
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run the `Plugs: Update` command and off you go!
|
||||||
|
|
||||||
|
## What's with all that Lone Ranger quotes
|
||||||
|
|
||||||
|
Don't you know that the [Lone Ranger used silver bullets to solve all the problems](https://en.wikipedia.org/wiki/Silver_bullet#Lone_Ranger)?
|
||||||
12
hello.ts
Normal file
12
hello.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { flashNotification } from "@silverbulletmd/plugos-silverbullet-syscall/editor";
|
||||||
|
|
||||||
|
const loneRangerQuotes = [
|
||||||
|
"Hi-Yo! Silver",
|
||||||
|
"Hi-Yo! Silver! Away!",
|
||||||
|
"Kemo Sabe",
|
||||||
|
"Get-um up, Scout!",
|
||||||
|
];
|
||||||
|
|
||||||
|
export async function helloWorld() {
|
||||||
|
flashNotification(loneRangerQuotes[Math.floor(Math.random() * loneRangerQuotes.length)]);
|
||||||
|
}
|
||||||
7
helloWorld.plug.yaml
Normal file
7
helloWorld.plug.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
name: hello-world
|
||||||
|
version: 0.1
|
||||||
|
functions:
|
||||||
|
helloWorld:
|
||||||
|
path: "./hello.ts:helloWorld"
|
||||||
|
command:
|
||||||
|
name: "Say hello"
|
||||||
11574
package-lock.json
generated
Normal file
11574
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
16
package.json
Normal file
16
package.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user