@pichalite
Sorry I think I did not do enough work just now.
I tried another several times and finally it succeeded with nodebb-plugin-recent-cards after restarting the forum instead of reloading it.
Thanks for the help.
Hey folks,
I've just released 1.0.0
of my completely reworked grunt
setup for NodeBB module development.
See nodebb-grunt.
If you remember this one you'll be happy to hear that I'm not used to CoffeeScript anymore.
The rework allows you to simply define custom compilation steps and guides you on the way to a new plugin/module - currently only a basic plugin setup is shipped.
One important (to me) compilation step is the meta-replace. Means every occurrences of @{...}
within certain files get replaced with the respective meta data (either from within package.json or .meta.json or from some pre-defined values, details are planned for the wiki).
So one might write "@{version}"
within source code and it gets resolved to sth. like "0.1.0+12"
.
This is useful for preventing meta-data to be defined on multiple places. Everything only needs to be defined once.
In combination with the pre-defined meta @{env}
which resolves to development
or distribution
, depending on which grunt task got run, this is a powerful feature. You can simply enable debugging for your development workflow without the need to care about disabling it anytime you want to publish.
It might still have a few glitches, but the main functionality is working so far.
I hope (with some more shipped module setups, etc.) it could help many fellows out there developing NodeBB modules.
And maybe I'll get it to be the standard environment for the NodeBB Community Projects
At least it's pretty helpful for myself developing modules (even so it didn't pay off the work I put into it yet ).
Some notes:
./g
bash script is undocumented within repository yet, see the source for usage information.@{...}
where appropriate)
rc
files (within setups/**/*) of JSLint, ESLint, JSCS, Closure Linter (alias GJSLint) which should be equivalent to the restrictions within the .jshintrc filesMy workflow on nodebb-plugin-shortcuts for example has been minimized to
./g sh d
- starts grunt dev:sh
and grunt
within NodeBB root./g sh e
- triggers defined publish tasks (see config/publish.json)Does this mean we'll see a reworked emoji extended too?
@julian is planned
Awesome, this is really all I ever wanted for NodeBB plugin dev. Great work, I hope it will become the standard for all plugins to come
@frissdiegurke said:
@julian is planned
Yes please! I want to submit a design for the emoji plugin to make it awesome on both desktop and mobile (see: fb, slack, mobile interface) but coffeescript...
Going to give this a run next time I build a plugin or theme, looking forward to it. Is livereload part of your future plans, I didn't see it in your docs
Maybe I'm missing the point, but can't you do
nconf.get("something")
Instead of
One important (to me) compilation step is the meta-replace. Means every occurrences of @{...} within certain files get replaced with the respective meta data (either from within package.json or .meta.json or from some pre-defined values, details are planned for the wiki).
@psychobunny livereload would need to be triggered by the NodeBB core grunt
task, since nodebb-grunt does only distribute the files for example into NodeBB/node_modules/nodebb-plugin-shortcuts/. From there on it relies on NodeBB Core grunt
to notice those file changes and reload/restart NodeBB.
So livereload would need to trigger when NodeBB is fully restarted.
@psychobunny said:
Maybe I'm missing the point, but can't you do
nconf.get("something")
Instead of
One important (to me) compilation step is the meta-replace. Means every occurrences of @{...} within certain files get replaced with the respective meta data (either from within package.json or .meta.json or from some pre-defined values, details are planned for the wiki).
nconf.file()
at runtime.@frissdiegurke Are you moving away from coffeescript in general? or just for your nodebb plugins?
@yariplus in general
@frissdiegurke Good.