@gotwf said in [nodebb-tools] CLI tools for NodeBB management:
Let us know, eh? Rock on!
Will do 🙂
Great
Now that it gets in shape here are a few more recommendations/notes:
npm
you could use rather than creating your own utilities lodash
(link), it's written for performance and consistency of usage. Your deepCopy
/buildOptions
would get replaced by _.merge
for example. It's really not a deal to have dependencies for such matters. Plus knowing a utilities features helps a lot keeping code to necessary stuff.opts.attrStrAllowColor
first would improve the code and performance..npmignore
file does not extend of a .gitignore
, you have to either fill it properly or remove it entirely (in this case npm will use the .gitignore
). You have some a bit of trash within your npm release Glad I could help!
Thanks always~
@frissdiegurke said:
- I guess the lib/defaults.js is never used and duplicates lib/magicblock/defaults.js, just a side note xD
Actually I use magicblock as a sepereated module, and lib/defaults.js
is a plugin side defaults
which can be different from magicblock defaults
, (they are yet same but.. ). Now, buildOptions
is called twice in library.js
and lib/magicblock/index.js
with different(but same) default.js
.
- There are a few tools at
npm
you could use rather than creating your own utilitiesI prefer
lodash
(link), it's written for performance and consistency of usage. YourdeepCopy
/buildOptions
would get replaced by_.merge
for example. It's really not a deal to have dependencies for such matters. Plus knowing a utilities features helps a lot keeping code to necessary stuff.
Yes, after I learned lodash
from your emoji plugin, I thought exactly same thing. Thanks twice :).
- I see some space for improvement here; Checking
opts.attrStrAllowColor
first would improve the code and performance.
Eagle eye!!
- A
.npmignore
file does not extend of a.gitignore
, you have to either fill it properly or remove it entirely (in this case npm will use the.gitignore
). You have some a bit of trash within your npm release
This is really something new I have never known.
I will quickly improve 3,4 first.
I got a question if this plugin works under v0.9.4.
But I tested/developed this my first plugin with only with v1.0.0, and have no idea about version compatibility.
What I can imagine to are
Could anybody give better or recommendable ideas?
@julian HI, I needed you 30 minitues ago!!
I just found out this acpScripts
after an hours testing and debuging.
I have(had) to read that post also.
Here is a link for others ( to save server resource from searching)
Actually, I have an question related with acpScript
.
So if I want to support v0.9.4 then what is best way?
admin.js
( commonly called ) to both of acpScript
and scripts
scripts
and remove from acpScript
I guess most effective way to support both versions is 3.
Could you let me know the best way?
@qgp9 You can embed the script into the template -- depends how comfortable you are with mixing your templates and client-side code, in terms of organisation
In order to support both, you'd have to maintain two branches in git. One for each level of support. You'd need to ensure the nbbpm.compatibility
values are set to the appropriate values in each branch's package.json
, and npm publish them both (though npm will show the readme of the latest published version).
nbbpm should be smart enough to figure out that different versions have different compatibilities and adjust its records accordingly. If not, let me know,.
Hi , All
I'm testing the plugin with v0.9.4 on Cloud9.
If you are interested on this, you can post/test freely without login.
https://nodebb-0-9-4-magicblock-qgp9.c9users.io/topic/2
It seems that [email protected] works well with [email protected]
@julian Thank you. I'll check them.
NEWS
nodebb-plugin-magicblock
has been updated to v0.1.8
A key feature of v0.1.7 is a hackIframely
which can enable iFramely only in blocks {{..}}
with an offical nodebb-plugin-iframely
.
Check details at a plugin page.
Nice job!