Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 1.68 KB

README.md

File metadata and controls

75 lines (52 loc) · 1.68 KB

How to make a plugin

Make the plugin project with the bootstrap

> npm run newplugin ./path/to/plugin
# it will install the generated plugin as a local package
# Please execute this on the bdsx directory

Build the plugin

  • With VSCode Ctrl+Shift+B -> tsc: watch

  • With the command line

> npm run watch

Install the plugin without npm publishing

Copy the plugin to plugins/ directory

Publish the plugin as a npm module

  1. Create an npm account if you don't have one yet. NPM Sign Up
  2. Request for joining @bdsx organization at #npm-bdsx-org-member-request channel of the discord server with npm ID or EMail.
  3. Login with the command line.
> npm login
npm notice Log in on https://registry.npmjs.org/
Username: # Enter Username
Password: # Enter Password
Email: (this IS public) # Enter Email
  1. Publish with the command line
> cd path/to/plugin # move to the plugin directory
> npm publish --access=public # publish the plugin

Install the npm module plugin

  • With the command line
> npm i @bdsx/pluginname
  • With the plugin manager
    Run plugin-manager.bat/sh.
    Search and select the plugin.
    Select the version.

Remove the npm module plugin

  • With the command line
> npm r @bdsx/pluginname
  • With the plugin manager
    Run plugin-manager.bat/sh.
    Search and select the plugin.
    Select Remove.

Remark

I don't recommend using low-level APIs like hooking. it can be broken by updating BDS. if you need the low-level feature I hope you contribute the code to BDSX about it. I will maintain it as I as possible.