Release the plugin SDK as a package file
pnpm release:sdk now packs runestone-plugin-sdk-<version>.tgz and sdk.json into releases/plugin-sdk/<version>/. Plugins install the SDK from the URL of that file on the RuneStone releases page. The script no longer uses a clone of a separate SDK repository. Installers, browser engine ZIPs, and SDK packages now share the RuneStone releases page.
This commit is contained in:
@@ -20,14 +20,15 @@ This reference gives the package contract, the build procedure, and the API for
|
||||
## Install the SDK
|
||||
|
||||
The plugin SDK `@runestone/plugin-sdk` gives the API types, the feature checks, and the RuneStone icons and tooltip.
|
||||
Install it in each plugin project from a release tag of its public repository. The SDK is not on the npm registry.
|
||||
Install it in each plugin project from the URL of its package file on the RuneStone releases page.
|
||||
|
||||
```sh
|
||||
pnpm add -D "git+https://git.knottywyvern.com/kwyvern/RuneStone_Plugin_SDK.git#v0.1.1"
|
||||
pnpm add -D "https://git.knottywyvern.com/kwyvern/RuneStone/releases/download/plugin-sdk-v0.1.2/runestone-plugin-sdk-0.1.2.tgz"
|
||||
```
|
||||
|
||||
- The repository is public. The installation needs no access token and no `.npmrc` file.
|
||||
- Always give a tag. To change the SDK version, change the tag in `package.json`.
|
||||
- Always give the full URL. The SDK is not on the npm registry, and another account owns the `@runestone` scope there.
|
||||
- npm accepts the same URL. The installation needs no access token and no `.npmrc` file.
|
||||
- To change the SDK version, change the version in both parts of the URL: the tag and the file name.
|
||||
- Bundle the SDK helpers into the entry module. A type-only import adds no code.
|
||||
- Do not copy RuneStone source files into a plugin, and do not import them from a RuneStone checkout. Use the SDK types and the host APIs.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user