I seem to remember an option to reload commandbox ...
# box-products
r
I seem to remember an option to reload commandbox on every request (useful when writing commandbox modules), but I cannot find it. Anyone remember it offhand?
b
Copy code
config set developerMode=true
👍 1
p
r
b
It's a little slow since it basically runs
reload
before every command, but it works.
p
Ahh yea I was gonna say reload but Brad beat me
👍 1
r
Thanks Brad, it was driving me nuts. I thought I could get around it by running
box
from CLI, but it seems that isn’t the same as
box reload
I googled it quite a few ways but I guess I couldn’t get it right
b
I've also had luck registering this interceptor somewhere
Copy code
function preCommand() {
        pagePoolClear();
        wirebox.getInstance( 'moduleService' ).reload( 'commandbox-name-of-module' );
    }
It just reloads the module itself which doesn't necessarily work if you['re hacking on the CommandBox core
r
the pagePoolClear is the special sauce?
b
no, not really
That just clears Lucee's trusted cache
The
moduleService.reload()
is the only "sauce" there, lol
r
Heh, I was reading too much into it..
b
reloading the module is 100 times faster FWIW
r
I have that book bookmarked 🙂
1
😎 1
b
Than reloading the entire shell
r
I will see if I can get the inteceptor working
b
Just paste it in your module's moduleConfig.cfc and do one last reload
YMMV since it's sort of like replacing the wings on an airplane in flight 😆
r
Sweet, thanks Brad! That is probably the least of my worries
That worked
You’re awesome. Thanks again
👍 1