NodeBB icon indicating copy to clipboard operation
NodeBB copied to clipboard

Add plugin.js support

Open stevefan1999-personal opened this issue 1 year ago • 2 comments

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

stevefan1999-personal avatar Jul 13 '22 17:07 stevefan1999-personal

I am not opposed to defining plugin configuration information this way :+1:

julianlam avatar Jul 13 '22 17:07 julianlam

@barisusakli @psychobunny what you guys think?

stevefan1999-personal avatar Aug 11 '23 16:08 stevefan1999-personal