NodeBB
NodeBB copied to clipboard
Add plugin.js support
Sometimes it would be better to use a full blown script for plugin manifest because we can use it to resolve some complicated stuff and future type stubs for code safety*. This practice is basically everywhere. SWC, ESLint, Mocha, Jest all allows such use.
For my own sake, this also added a slightly good benefit of lexicographically sorting the fields thanks to ESLint. My OCD hits when I see the fields not being sorted from A to Z.
*: if you used a TypeScript transpiler, that is what most people should start doing.
Missing
- Tests
- Examples: https://github.com/stevefan1999-personal/nodebb-plugin-stub
I am not opposed to defining plugin configuration information this way :+1:
@barisusakli @psychobunny what you guys think?