|
| 1 | +# Luna Plugins |
| 2 | + |
| 3 | +This is a template & example of how to develop **[Tidal Luna](https://github.com/Inrixia/TidaLuna)** plugins. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +Follow these steps to create your own Luna plugin using this template: |
| 8 | + |
| 9 | +### 1. Clone the Repository |
| 10 | + |
| 11 | +```sh |
| 12 | +git clone https://github.com/Inrixia/luna-template.git luna-plugins |
| 13 | +cd luna-plugins |
| 14 | +``` |
| 15 | + |
| 16 | +### 2. Install Node.js (if missing) |
| 17 | + |
| 18 | +If you don't have Node.js installed, use [nvm](https://github.com/nvm-sh/nvm): |
| 19 | + |
| 20 | +```sh |
| 21 | +nvm install node |
| 22 | +nvm use node |
| 23 | +``` |
| 24 | + |
| 25 | +> This will install and use the latest Node.js version. |
| 26 | +
|
| 27 | +### 3. Enable pnpm via Corepack |
| 28 | + |
| 29 | +[Corepack](https://nodejs.org/api/corepack.html) is included with Node.js 16.10+. |
| 30 | + |
| 31 | +```sh |
| 32 | +corepack enable |
| 33 | +corepack prepare pnpm@latest --activate |
| 34 | +``` |
| 35 | + |
| 36 | +### 4. Install Dependencies |
| 37 | + |
| 38 | +```sh |
| 39 | +pnpm install |
| 40 | +``` |
| 41 | + |
| 42 | +### 5. Start Developing |
| 43 | + |
| 44 | +- Edit files in the `plugins/Example` directory to build your plugin. |
| 45 | +- Use `pnpm run watch` to build and serve with hot reload. |
| 46 | + |
| 47 | +> While developing, you can install your local plugin into Tidal Luna using a local URL. |
| 48 | +> For example, if your plugin is `@luna/example` and you are running the dev server, use: |
| 49 | +> `http://127.0.0.1:3000/luna.example` as the install URL in Tidal Luna. |
| 50 | +
|
| 51 | +### 6. Update the README |
| 52 | + |
| 53 | +Replace this README with information about your plugin: |
| 54 | + |
| 55 | +- What it does |
| 56 | +- How to use it |
| 57 | +- Any configuration or setup steps |
| 58 | + |
| 59 | +### 7. GitHub Actions: Workflow Permissions |
| 60 | + |
| 61 | +If you want to use the included GitHub Action in (`.github`) to automatically create releases, you must set your repository workflow permissions to **Read and write permissions**: |
| 62 | + |
| 63 | +1. Go to your repository's settings: `Settings > Actions > General` https://github.com/.../.../settings/actions |
| 64 | +1. Under **Workflow permissions**, select **Read and write permissions**. |
| 65 | +1. Click **Save**. |
| 66 | + |
| 67 | +This allows the GitHub Action to create releases on your behalf. |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +For more details, see the [Tidal Luna documentation](https://github.com/Inrixia/TidaLuna). |
0 commit comments