[slush-nodebb-plugin] NodeBB New Plugin Generator - Request for feedback
-
I've created and published a tool for helping to generate new NodeBB plugins. I'd be interested in people's feedback on how well it works and additional functionality. Launching the tool prompts the user about necessary features and then generates a plugin .
The generator can currently help to:
- Correctly create the package.json and plugin.json files with the appropriate default contents
- Create the stub methods and files for a new widget
- Create the stub methods and files for listening to a system hook
- Create the stub methods and files for a custom admin page
- Create the stub methods and files for a custom page
- Register a stub javascript file that will be injected on all NodeBB pages
- Register a stub style template (less/css) that will be injected on all NodeBB pages
- Register a reference to a template folder for overriding system templates
I've tested this out in a variety of ways and it seems to work properly as of NodeBB 0.8.2
You can find the ReadMe with installation instructions here:
https://www.npmjs.com/package/slush-nodebb-pluginThanks for any feedback!
-
Nice work!
-
Thank you!
-
Awesome. I think the term for this is a Yeoman Generator?
-
@psychobunny I had looked at the Yeoman/Grunt approach, but this uses Slush/Gulp.
-
Ha! Cool. Thanks!
-
@rbeer Oh man, you're on it! I'll check out the pull request.
-
Released a new version with some tweaks by @rbeer
https://www.npmjs.com/package/slush-nodebb-pluginThanks @rbeer
-
@lulzdev Like what?
-
many javascripts would require a custom plugin to use with Nodebb, the more plugins you use the more expensive developing becomes. One that comes to mind offhand is the javascript meme generator. Just trying to understand the new hotness everyone is happy about.
-
@lulzdev You can include JavaScript in the custom HTML header section in the ACP
-
@lulzdev I don't think so
-
@lulzdev the generator can register a js file in the plugin.json and include a stub file for you. Give it a try and let me know how it goes.
-
Just a note that I updated this plugin to correctly do the two part NodeBB custom routes (api/rendered). If anyone has any feedback, I'd appreciate it.
-
@lulzdev Sorry for the late reply, but I just ran into a javascript/css inclusion case where I wanted both included as static files for dev. I think just overriding the header.tpl and then linking to static js/css files in your plugin can be good for dev purposes.