coldbox-modules / cbwire

CBWIRE is a ColdBox module that makes building reactive, modern apps easy using HTML-over-the-wire technologies and CFML.
https://cbwire.ortusbooks.com
Other
28 stars 5 forks source link

Updates module support #130

Closed mrigsby closed 11 months ago

mrigsby commented 11 months ago

Updated wire@module support to allow using #wire( "wire@module" )# outside of the module the wire exists in.

If just the wire name is used from inside a module and the wire does not exist in the current module, it looks for a matching wire name in the root wire location and if found uses it.

Note: commit 111a220 is supposed to be "added regex for SAFE wire name"

grantcopley commented 11 months ago

@mrigsby I'm just now seeing this. I'll take a look through the changes and report back. Thanks for the PR!

mrigsby commented 11 months ago

@mrigsby I'm just now seeing this. I'll take a look through the changes and report back. Thanks for the PR!

Thanks, hopefully it's up to par and helpful :-)

grantcopley commented 11 months ago

@mrigsby This looks really good! I made a few changes as I noticed issues if you tried to reference a subfolder within a module, such as: #wire( "folder.myComponent@myModule" )#.

I added tests to cover all the scenerios. I'll be doing some more testing and will merge soon.

Thanks so much for your help!

mrigsby commented 11 months ago

@grantcopley Glad to help where I can. I really love cbwire. Thank you for all your work!

mrigsby commented 11 months ago

Thanks @grantcopley, I'm glad I could contribute!