Code Monkey home page Code Monkey logo

bdpluginlibrary's Introduction

PluginLibrary - Download Build Status Language Grade Patreon Paypal

This is the repo for Zere's Plugin Library for BetterDiscord. For now this is only for BBD/BDv1 You can follow development here. There will be more info and shit to come, but for now here ya go.

Library Documentation

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.

Building The Lib

npm install
npm run build

This generates a BD compatible ./release/0PluginLibrary.plugin.js file to be added to your plugins folder.

Configuration

The library is configurable with the default configuration found in the package.json. If you want to alter or extend these settings it's recommended that you create a config.json in the root directory that the build scripts will read and use. Note that this is merged with the default configuration so you don't have to include all the possible settings in the config.json.

Options

pluginsFolder

Absolute or relative path to the folder containing the plugins that build scripts can build automatically.

Default: "./plugins"


releaseFolder

Absolute or relative path to the folder where plugins that are built should be placed.

Default: "./release"


copyToBD

Boolean to determine if the built plugin should also be automatically copied over to your BD plugins directory. Very convenient for development.

Default: false


addInstallScript

Boolean to determine if the plugin should include the Windows Host Script install script. This means that users on Windows that double click the plugin will be prompted to automatically install the plugin.

Default: false


Building Plugins

See the example plugin in examples/ExamplePlugin. Note how it does not check for updates in onStart instead the base class Plugin automatically checks for updates using the github_raw in the config.json.

All plugin styles will set the meta using the plugin name for name. github and github_raw will be used as website and source options in the meta.

Plugins Using Lib Plugin (recommended)

To build all plugins in plugins folder, run npm run build_plugin. To build a single plugin run npm run build_plugin PluginName. This will yield PluginName.plugin.js in the releases folder with the same meta as outlined in the template. The resulting file will automatically check if the plugin library exists, and alert the user if it does not giving them a link to download it.

Plugins Using Remote Lib THIS IS DEPRECATED

To build all plugins in plugins folder, run npm run build_plugin_remote. To build a single plugin run npm run build_plugin_remote PluginName. This will yield PluginName.plugin.js in the releases folder with the same meta as outlined in the template. The resulting file will automatically load the library from a remote source (on this repo) if it is not found.

Plugins w/ Packed Lib (larger file sizes)

To pack a plugin run npm run build_plugin_packed PluginName. This will produce a single PluginName.plugin.js file in the releases folder with the basic meta up top. This version will include all lib functions internally. To pack all plugins in the plugins folder run npm run build_plugin_packed without arguments.

bdpluginlibrary's People

Contributors

zerebos avatar strencher avatar alvesvaren avatar dorcomando avatar jaimeadf avatar mwittrien avatar 1lighty avatar darten73 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.