Skip to content

Commit

Permalink
publish plugin docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Oct 20, 2024
1 parent bbae992 commit 537a98b
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/studio/04-plugins/03-write-plugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ public class TestExtensionModule : IModule
}
```

## The oneware-extension.json file

## Dependency management

Your created plugin will contain a oneware-extension.json. There you can specify the compatible and required dependencies.
Your created plugin will contain a oneware.json inside the main project folder. There you can specify the compatible and required dependencies.
For an empty plugin with basic dependencies it will look similar to this:

:::info
The need for a oneware.json file might be removed in future updates and replaced by automatic generation.
:::

```json
{
"Dependencies": [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions docs/studio/04-plugins/04-publish-plugin/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Publish Plugin
---

## The oneware-extension.json file

The oneware-extension.json is the manifest for the extension, and will be needed to show the plugin inside the package manager.

```json
{
"category": "Tools",
"type": "Plugin",
"name": "Test Plugin",
"id": "TestModule",
"description": "Test Plugin Description",
"license": "MIT",
"iconUrl": "https://raw.githubusercontent.com/Author/TestPlugin/main/Icon.png",
"tabs": [
{
"title": "Readme",
"contentUrl": "https://raw.githubusercontent.com/Author/TestPlugin/main/Extension.md"
},
{
"title": "License",
"contentUrl": "https://raw.githubusercontent.com/Author/TestPlugin/main/License.md"
}
],
"links": [
{
"name": "Github",
"url": "https://github.com/Author/TestPlugin"
}
],
"versions": [
{
"version": "0.1",
"targets": [
{
"target": "all",
"url": "https://github.com/Author/TestPlugin/releases/download/0.1/TestPluginExtension_0.1_all.zip"
}
]
}
]
}
```

## Platform specific targets:

If your plugin contains platform specific code or assets, you can also publish it in different versions for each platform.
In most cases osx-x64 can also be used by osx-arm64 (with performance degradation).

```json
{
"target": "linux-x64",
"url": "https://github.com/Author/TestPlugin/releases/download/0.1/TestPluginExtension_0.1_linux-x64.zip"
},
{
"target": "osx-x64",
"url": "https://github.com/Author/TestPlugin/releases/download/0.1/TestPluginExtension_0.1_osx-x64.zip"
},
{
"target": "osx-arm64",
"url": "https://github.com/Author/TestPlugin/releases/download/0.1/TestPluginExtension_0.1_osx-arm64.zip"
}
```

## Run Release Pipeline

The template contains a release pipeline that you can use to create a github release.

![Release Pipeline](img/release-pipeline.png)

After running it sucessfully it will create a Release in /releases of your github repository automatically.

## Try out plugin

You can add a link to your uploaded oneware-extension.json source in the settings.

![Add Plugin Source](img/add-plugin-source.png)

The link should be the raw json file like that (https://raw.githubusercontent.com/one-ware/OneWare.GhdlExtension/refs/heads/master/oneware-extension.json)

After refreshing your published plugin should be available in the package manager.

## Submit to Package Manager

If you want your Plugin to be visible for everyone, you can open a Pull Request [here](https://github.com/one-ware/OneWare.PublicPackages)

0 comments on commit 537a98b

Please sign in to comment.