I have been thinking about ways to make the package manager better. I would love to be able to install packages from RIAForge, cflib.org, or any arbitrary code repo like github from the package manager.
I would also love to be able to add a package to the registry via CLI like bower allows you to “bower register foo ”. This would have the dual purpose of enabling mass registration of all the packages at a given site, e.g. cflib. Lots of details there, I know, just thinking it would be worth making the package manager more open.
i would think an API update for cflib might be in order, and it would be super-cool if someone organized sets of functions in cflib into libraries that could be packaged together, e.g. lists, math, arrays, etc.
The problem with cflib is that none of those libraries have the box.json. Thus are not packages.
Also, we do have several commands coming down the pipe to allow you to submit and update packages from the CLI. This is part of ForgeBox 2 currently in development. Once we have something available we will post for beta testing.
Right, I was thinking more along the lines of seeing if Ray would be open to some kind of process where all the metadata about packages in cflib is used to create a box.json for each library and an API endpoint that CommandBox could call to install those packages. Not so much about work on the CB end as changes to CFLib to enable the functionality. Seems like a shame for so many library functions not to be easily accessible from CB…
No, I hadn’t seen that. It will be interesting to see how that affects the site. The chances of getting any changes made to it are probably less likely now though.
They won’t be perfect since CFLib and RIAForge don’t enforce any standard kind of package format nor a box.json package descriptor, but at least it will allow people to install easily from those registries via a slug name.
Jon C, to respond to your comment about custom lib repos needing to match Forgebox’s API, this is not the case. There is an interface inside CommandBox that needs to be implemented by an endpoint and that is all. It is up to that endpoint CFC as to how it communicates with the actual external package registry.
(Drops the UDF in a .cfm file and it’s up to you to include it somewhere)And spicy ColdBox module!
install cflib-coldbox:foo
That last one wraps it up as a module so you can install it in a Coldbox app and immediately inject it anywhere like so:
getInstance( "foo@cflib" ).foo()
This now allows you to use any CFLib UDF in your apps and you need only specify it as a dependency in your box.json.
Your CFLib packages will show up in the command and are even updatable via the command if a new version comes out.
Just replace “foo” with the slug of the UDF you want to install. Ex:
And, one more little update. I just added another little nugget in the bleeding edge of CommandBox. You can now install packages from RIAForge IF their download URL points to a zip file:
install riaforge:iwantmylastfm
Just use the “riaforge” prefix and then use the URL slug of a package.