ZeresPluginLibrary - Download ![Language Grade](https://camo.githubusercontent.com/09d7f06bf8adca7698603f37cd9737124559ec673dcce55568d6bf05e5c64fa7/68747470733a2f2f696d672e736869656c64732e696f2f6c67746d2f67726164652f6a6176617363726970742f672f726175656e7a692f4244506c7567696e4c6962726172792e7376673f7374796c653d666c61742d737175617265)
This is the repo for Zere's Plugin Library for BetterDiscord. You can follow development here. There will be more info and shit to come, but for now here ya go.
View the library documentation here: https://rauenzi.github.io/BDPluginLibrary/docs
The information below is just a quickstart guide and overview on using the build scripts provided.
If you'd like a real-world example, take a look at https://github.com/rauenzi/BetterDiscordAddons
First add the library builder to your repo:
npm install zerespluginlibrary
Then add to your package.json
:
{
//...
"scripts": {
// ...
"build": "zpl build",
"init": "zpl init"
}
// ...
}
Create your ZPL config. You can use .zplrc
, .zplrc.js
, or a top-level zplConfig
key in package.json
;
// .zplrc.js
module.exports = {
base: "./examples",
out: "./release",
copyToBD: true,
addInstallScript: true
};
Initialize your first plugin with:
npm run init PluginName
You should a new folder with an index.js
and config.json
. When you're ready to build, just run:
npm run build PluginName
and a new PluginName.plugin.js
will be created in your output folder.
npm install
npm run build
This generates a BD compatible ./release/0PluginLibrary.plugin.js
file to be added to your plugins folder.
The library is configurable with the default configuration found in the package.json
.
Absolute or relative path to the folder where plugins that are built should be placed.
Default: "./release"
Absolute or relative path to the BetterDiscord folder. Useful when combined with copyToBD
. This folder is found automatically on most system.
Default: "<os-specific>/BetterDiscord"
Boolean to determine if the built plugin should also be automatically copied over to your BD plugins directory. Very convenient for development.
Default: false