From 7f5c5743988c3c6a6781b4880ef950e1f8e29cc7 Mon Sep 17 00:00:00 2001 From: amyulating Date: Sun, 22 Dec 2024 16:57:15 +0000 Subject: [PATCH] deploy: b6089a75ed750861c883a927d3ae7798bc30acb4 --- 404.md | 42 +++++++++++++++++++++++++++++++++++++++++ README.md | 37 ++++++++++++++++++++++++++++++++++++ hello-world/plugin.js | 38 +++++++++++++++++++++++++++++++++++++ hello-world/plugin.json | 1 + 4 files changed, 118 insertions(+) create mode 100644 404.md create mode 100644 README.md create mode 100644 hello-world/plugin.js create mode 100644 hello-world/plugin.json diff --git a/404.md b/404.md new file mode 100644 index 0000000..d292345 --- /dev/null +++ b/404.md @@ -0,0 +1,42 @@ +--- +permalink: /404.html +--- +> **Note:** You accessed a link that returned a 404, probably by clicking one of the plugin links. You're supposed to copy the link address and add it into shelter. + +# [Your name here]'s shelter plugins +If you're reading this you should either change this README, +or you should run `npx degit uwu/shelter-template shelter-plugins`! + +## Getting started +You should be using [pnpm](https://pnpm.io/) with this template ideally. + +To install the dependencies and debug `hello-world` run: +```sh +pnpm i +pnpm lune dev plugins/hello-world +``` + +Ensure that Lune Dev Mode is enabled in Discord so that lune can connect to it. + +Now you can start debugging. The plugin will automatically reload after every change. + +## Installing +To then install your finished plugin in shelter you can either rely on GitHub pages and it's workflow or you can build and host them here temporarily. + +### Building locally +To build and host your plugins locally run: +```sh +pnpm lune ci +npx http-server dist/ --cors +``` +Then you can install your plugin in shelter with this URL `http://localhost:8080/hello-world`. + +### Publishing via GitHub +If you have published this repo on GitHub the plugins will be built after every commit. + +For the GitHub action to run flawlessly, make sure you have the following setting enabled: +`Repo settings > Actions > General > Workflow permissions > Read and write permissions` + +And for it to be hosted correctly you need to configure the `gh-pages` branch after its been created by the GitHub action. You can do this in `Repo settings > Pages > Branch`. + +If this worked, you will be able to install the plugin via `https://.github.io//hello-world`. diff --git a/README.md b/README.md new file mode 100644 index 0000000..dc673c1 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# [Your name here]'s shelter plugins +If you're reading this you should either change this README, +or you should run `npx degit uwu/shelter-template shelter-plugins`! + +## Getting started +You should be using [pnpm](https://pnpm.io/) with this template ideally. + +To install the dependencies and debug `hello-world` run: +```sh +pnpm i +pnpm lune dev plugins/hello-world +``` + +Ensure that Lune Dev Mode is enabled in Discord so that lune can connect to it. + +Now you can start debugging. The plugin will automatically reload after every change. + +## Installing +To then install your finished plugin in shelter you can either rely on GitHub pages and it's workflow or you can build and host them here temporarily. + +### Building locally +To build and host your plugins locally run: +```sh +pnpm lune ci +npx http-server dist/ --cors +``` +Then you can install your plugin in shelter with this URL `http://localhost:8080/hello-world`. + +### Publishing via GitHub +If you have published this repo on GitHub the plugins will be built after every commit. + +For the GitHub action to run flawlessly, make sure you have the following setting enabled: +`Repo settings > Actions > General > Workflow permissions > Read and write permissions` + +And for it to be hosted correctly you need to configure the `gh-pages` branch after its been created by the GitHub action. You can do this in `Repo settings > Pages > Branch`. + +If this worked, you will be able to install the plugin via `https://.github.io//hello-world`. diff --git a/hello-world/plugin.js b/hello-world/plugin.js new file mode 100644 index 0000000..d70b02d --- /dev/null +++ b/hello-world/plugin.js @@ -0,0 +1,38 @@ +(() => { + var __defProp = Object.defineProperty; + var __getOwnPropDesc = Object.getOwnPropertyDescriptor; + var __getOwnPropNames = Object.getOwnPropertyNames; + var __hasOwnProp = Object.prototype.hasOwnProperty; + var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + + // plugins/hello-world/index.jsx + var hello_world_exports = {}; + __export(hello_world_exports, { + onLoad: () => onLoad, + onUnload: () => onUnload + }); + var { + util: { + log + } + } = shelter; + function onLoad() { + log("Hello, World from shelter!"); + } + function onUnload() { + log("Goodbye, World from shelter!"); + } + return __toCommonJS(hello_world_exports); +})(); diff --git a/hello-world/plugin.json b/hello-world/plugin.json new file mode 100644 index 0000000..c63ddf2 --- /dev/null +++ b/hello-world/plugin.json @@ -0,0 +1 @@ +{"name":"hello-world","author":"Your name here","description":"An example shelter plugin","hash":"38b9443d1726222278f0c08f6258a9ec"} \ No newline at end of file