Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(testing): update instructions for testing #57

Merged
merged 3 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion _sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- [**Usage Tips**](/usage-tips.md)
- [**Plugin Directory**](/plugins.md)
- Plugin Development
- [**Get Started**](/plugin-dev.md)
- [**plugin.json**](/plugin.json.md)
- Dotnet Plugins
- [**Development Guide**](/develop-dotnet-plugins.md)
Expand All @@ -17,7 +18,10 @@
- [**Set up your project**](/nodejs-setup-project.md)
- [**Write the code**](/nodejs-write-code.md)
- [**Add your plugin to Flow**](/nodejs-release-project.md)
- Testing Plugins
- [**Testing Guide**](/testing.md)
- JSONRPC
- [**JSON RPC Introduction**](/json-rpc.md)
- [**Porting Plugins**](/port-plugins.md)
- Porting Plugins
- [**Porting Plugins Guide**](/port-plugins.md)
- [**How To Create a Theme**](/how-to-create-a-theme.md)
8 changes: 4 additions & 4 deletions json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> [JSON-RPC](https://en.wikipedia.org/wiki/JSON-RPC) is a remote procedure call protocol encoded in JSON.

In Flow Launcher, we use JSON-RPC as a **local** procedure call protocol to bind Flow and other program languages.
In Flow Launcher, we use JSON-RPC as a **local** procedure call protocol to bind Flow and other program languages ([**Python plugin**](/py-develop-plugins.md) and [**JavaScript/TypeScript plugin**](/nodejs-develop-plugins.md)).

So we need to build a **common API** between Flow and Plugin.

Expand Down Expand Up @@ -33,7 +33,7 @@ API is located [here](https://github.com/Flow-Launcher/Flow.Launcher/blob/master
- `Flow.Launcher.HideApp`: hide flow launcher
- `Flow.Launcher.ShowApp`: show flow launcher
- `Flow.Launcher.ShowMsg`: show messagebox
- `Flow.Launcher.GetTranslation`: get translation of current language
- `Flow.Launcher.GetTranslation`: get translation of current language
- `Flow.Launcher.OpenSettingDialog`: open setting dialog
- `Flow.Launcher.GetAllPlugins`: get all loaded plugins
- `Flow.Launcher.StartLoadingBar`: start loading animation in flow launcher
Expand All @@ -44,8 +44,8 @@ API is located [here](https://github.com/Flow-Launcher/Flow.Launcher/blob/master

```json
{
"method": "Flow Launcher API Name",
"parameters": []
"method": "Flow Launcher API Name",
"parameters": []
}
```

Expand Down
20 changes: 20 additions & 0 deletions plugin-dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Get Started

Welcome to the comprehensive guide to plugin development in Flow Launcher.

## Types of plugin implementation

While Flow Launcher is written in C#, plugins can be written natively or in other languages.

### Natively (no intergration needed)

- [**C# (.NET framework)**](/develop-dotnet-plugins.md)

### Using JSON-RPC

For other languages, Flow launcher communicates with the plugin via [JSON-RPC](/json-rpc.md).

Currently supported languages are:

- [**Python**](/py-develop-plugins.md)
- [**JavaScript / TypeScript (NodeJS)**](/nodejs-develop-plugins.md)
14 changes: 14 additions & 0 deletions testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Testing your plugin

After successfully building a plugin, it can be tested locally by moving the output files into Flow Launcher's `FlowLauncher\Plugins` directory accessible via the `userdata` command in Flow Launcher. Alternatively, if you are building .Net (C# or F#) plugins you can have your IDE build the artefact directly to that location (remember not to check this build output path into Git though).


### Detail Steps

1. Execute `userdata` in Flow Launcher.
2. Navigate into the `Plugins` folder.
3. Move exisiting plugin with the same `Plugin ID` as specify in `plugin.json` away from the folder (_**if more than one plugin have the same `Plugin ID`, none of them will be loaded**_).
4. Copy and paste the newly built plugin folder into this folder.
5. Execute `Restart Flow Launcher` to reload the new plugin.

Tip: .Net plugins (e.g. C# and F#) will require you to restart flow every time you make a change and build a new artefact to reload the plugin, but Python and JS/TS plugins you can edit the plugin directly.