Skip to content

Commit 2d110b5

Browse files
update NodeJS examples to include relevant command
1 parent 9c7fd93 commit 2d110b5

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

ldk/node/examples/clipboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "",
55
"main": "src/index.ts",
66
"scripts": {
7+
"build": "rm -rf dist && tsc",
78
"test": "echo \"Error: no test specified\" && exit 1"
89
},
910
"author": "",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Clipboard LDK Usage Example
2+
This NodeJS module utilizes the OliveHelps NodeJS LDK to demonstrate listening for clipboard events and sending them to the OliveHelps UI as Whispers.
3+
4+
### Modifying and Building
5+
The Loop itself is defined in `src/index.ts` and can be built into `dist/index.js` for actual use by OliveHelps.
6+
7+
Install dependencies
8+
```shell
9+
npm install
10+
```
11+
12+
Modify `src/index.ts` as desired.
13+
14+
Convert the TypeScript to JavaScript
15+
```shell
16+
npm run build
17+
```
18+
19+
### Running Locally
20+
21+
#### Local Plugin Command (Recommended)
22+
23+
Olive Helps lets you add a local command as a Local Loop:
24+
25+
1. Open Olive Helps.
26+
2. Open the Loop Library:
27+
1. Click the Hamburger icon.
28+
2. Click Loop Library.
29+
3. Click the "Install Local Loop" button:
30+
4. Select the working directory for the Loop (the directory this README is in).
31+
5. Enter the command to be executed, including any arguments. For this example the command will be `node dist/index.js` (Refer to the "Modifying and Building" section above on how to generate this file)
32+
6. Click Install.
33+
34+
The command will be installed as a Loop. If you need to change the command or its arguments you'll need remove it and then add the new commands.
35+
36+
Otherwise, if you instead want to make changes to the Loop itself, you can:
37+
- Modify `src/index.ts`
38+
- Follow the directions in the "Modifying and Building" section to turn it to JavaScript
39+
- Restart OliveHelps
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Whisper List LDK Usage Example
2+
This NodeJS module utilizes the OliveHelps NodeJS LDK to demonstrate the different types of formatting and options available in Loop Whispers.
3+
4+
### Modifying and Building
5+
The Loop itself is defined in `src/index.ts` and can be built into `dist/index.js` for actual use by OliveHelps.
6+
7+
Install dependencies
8+
```shell
9+
npm install
10+
```
11+
12+
Modify `src/index.ts` as desired.
13+
14+
Convert the TypeScript to JavaScript
15+
```shell
16+
npm run build
17+
```
18+
19+
### Running Locally
20+
21+
#### Local Plugin Command (Recommended)
22+
23+
Olive Helps lets you add a local command as a Local Loop:
24+
25+
1. Open Olive Helps.
26+
2. Open the Loop Library:
27+
1. Click the Hamburger icon.
28+
2. Click Loop Library.
29+
3. Click the "Install Local Loop" button:
30+
4. Select the working directory for the Loop (the directory this README is in).
31+
5. Enter the command to be executed, including any arguments. For this example the command will be `node dist/index.js` (Refer to the "Modifying and Building" section above on how to generate this file)
32+
6. Click Install.
33+
34+
The command will be installed as a Loop. If you need to change the command or its arguments you'll need remove it and then add the new commands.
35+
36+
Otherwise, if you instead want to make changes to the Loop itself, you can:
37+
- Modify `src/index.ts`
38+
- Follow the directions in the "Modifying and Building" section to turn it to JavaScript
39+
- Restart OliveHelps

0 commit comments

Comments
 (0)