Is it possible to have this folder structure for ...
# box-products
d
Is it possible to have this folder structure for a forgebox module and use a git repository? box.json :
Copy code
"repository": {
    "type": "git",
    "URL": "<https://github.com/webmandman/XYZ>"
}
folder structure :
Copy code
src/
    lib/
    models/
    ModuleConfig.cfc
coldbox-example-app/
non-coldbox-example-app/
box.json
The src folder is the forgebox module.
I'm thinking I need to have github "releases" and reference a zip archive instead. I think there is a forgebox command to search for modules of type zip.
I believe I just need to move my box.json to the src folder and set my package's location to
ForgeboxStorage
. Then run
bump --minor
and
publish
from the src folder.
b
I have no earthly idea what you're talking about, lol
If you're asking how to organize the repo for a module, there are some pointers that are my favorite approach: • Make the module root be the repo root. keeps stuff simple. • Don't put sample apps in the repo. Separate them elsewhere and link to them in your readme. This just complicates the repo setup and your ignores.
1
d
Well I've seen the source code for forgebox modules and they all have box.json and ModuleConfig.cfc at the repo root. But I want that folder structure above.
The reason I want to add a sample app in the same repo as the module is for a better development experience. Being able to start up my coldbox sample app and watch my module changes feels right.
I thought this would be possible given that the
publish
command zips up the module and uploads it to S3.
b
If you want to be able to hack on your module while testing int he sample app, that's fine. Just use the
link
command. This doesn't have any bearing on where the pieces live.
Just symlink your module into the sample app
But there's nothing preventing you from having whatever folder structure you want. You'd just run your bump and publish commands from inside the
src
folder.
And you'd need to do some funky magic with CF mappings to get ColdBox to load the module, especially since it's not in a folder with the name of the module, which will mess some stuff up.
d
Ah thats the gotcha. Coldbox by convention doesn't use src...haha. screw it - your package link idea is nice.