I want to MANUALLY download a CFWheels Plugin - sp...
# box-products
b
I want to MANUALLY download a CFWheels Plugin - specifically https://www.forgebox.io/view/cfwheels-js-confirm I can't find a link on that page to manually download the plugin. Where can I get it?
b
@Brian Lang The least amount of work is really to just type
Copy code
install cfwheels-js-confirm
into CommandBox. You can get the equivelant code, but that package uses a Git URL with commitish. For example, the
1.0.5
version is pulled from this location
Copy code
"location": "perdjurner/cfwheels-js-confirm#v1.0.5",
(That's from the package's
box.json
) which basically means the
perdjurner/cfwheels-js-confirm
repo is cloned from Github, then the
v1.0.5
tag is checked out.
b
OK, how do I do that on a server where I'm not permitted to install CommandBox?
b
So you can basically manully clone that repo and checkout the code at that tag to get the same thing CommandBox would give you. You'd also need to manually take into account the
ignore
section in the
box.json
as well
Copy code
"ignore": [
    "**/.*",
    "test",
    "tests"
  ],
CommandBox doesn't need to be "installed". It's just a binary you run šŸ™‚
It's also on the DoD's DADMS list of approved software which may help you if this is a government project
I do have one client who just runs it off a thumb drive to get around some silly limitations of his over zealous security teams
b
Not government. Just not sure I'd get permission to run this on a production server
b
A good question may be why on earth you're installating things directly on a production server?
Isn't that something you'd do as part of development or at least on a build server?
b
Setting up a new production server. It's not in productio nyet.
b
Right, but you still write code... in dev, right?
Honestly, just run the command on your local PC, and the you can copy up the stuff it downloads to whatever prod servers you need.
b
We normally use DeployHQ to upload code to our production servers normally.
b
Right, so whereever it is you upload it from-- that's where you'd be installing it, right?
Assuming based on our convo, you don't have any sort of build CI/CD server taking care of those things
I'm not clear whether you're using source control and copying files from there, or just putting code on a dev machine and then copying the files across the network
b
I commit to our github repo, and DeployHQ draws from there
b
Right, so then it comes down to whether you • commit dependencies to the repo • only store them the
box.json
and then install them as part of your build
The last bullet is more common for anyone automating migrations and the deploy is a matter of • pull code •
box install
,
npm insatll
, etc, etc
But some people also just manage their packages in dev and commit the result so it's all 100% in source. Then it's just a matter of pulling the latest from Git
b
Yeah - no build/integration process after upload. Old-school CF didn't need it šŸ™‚
b
That's fine- if you're not set up to have CommandBox on prod to pull dependencies, then I'd just go with a process where you commit them to source control.
So the
install
is just something you'd do locally, test, then commit it all
b
Yeah, that's normally how it works. As this is new, I was trying to shortcut the process to start testing.
Got what I needed in the #cfwheels topic. Thanks
b
Keep in mind the advice you were given there isn't going to work on all packages
It may be fine for a simple package with no dependencies. But a lot of packages have nested dependencies and it's the job of the package manager to assemble them all for you.
Just grabbing a zip from Github isn't going to do that
b
That's ok. I'm trying to upgrade a legacy 10-year old CFWheels 1.4.x on CF16 project to 2.x on CF21.
I can't just jump to the latest tools because of legacy code.
b
I don't really buy that. Nothing is preventing you from grabbing the CommandBox binary and tossing it on your desktop so you can run
box install asdf
šŸ˜‰
b
True. I tried it though, and didn't get the ZIP file for that plugin that CFWheels requires. CFWheels requires the ZIP file in the plugins folder and box install ... didn't pull down a ZIP file at all
b
The latest version of CFWheels requires a zip?
I don't really use CFWheels--- that's just... odd
b
Plugins in CFWheels have always required a ZIP. That gets extracted to a folder in the plugins directory whenever you run a reload on the site
b
Hmm, I'm pretty sure the CFWheels devs have made it so CommandBox will install whatever it is CFWheels needs out of the box. Perhaps you didn't have the wheels CLI module installed
d
Hey Brad, Brian is correct that at present CFWheels plugins are always zip files that get unpacked on first load. Peter has been doing an excellent job in improving the CLI tools but the plug-ins haven't changed as of yet. Much of this is being discussed for the next 3.0 release of CFWheels.
r
@Brian Lang @bdw429s @David Belanger Just wanted to chime in. I understand what you are referring to but I don't use zips in plugins folder. In config/settings.cfm I have:
Copy code
set(overwritePlugins=false);
set(deletePluginDirectories=false);
Then I don't need the zips. Also in commandbox when I'm in the cfwheels web root and issue
Copy code
install defaultScope
it not only puts the zip in the plugins folder but extracts it too. So you don't need what I put in settings above I just do it because I personally remove the zips out of my plugins folder.
b
That should be added to the documentation on the page discussing Plugins
r
There is a plugins settings table if you scroll down
b
Ah. I see it. A cross-reference from the Plugins page would be helpful then https://guides.cfwheels.org/cfwheels-guides/plugins/installing-and-using-plugins
b
Nice, thanks for all the extra info guys!
d
You are correct @risto that, at present, you need to customize CFWheels to not look for and expand a zip or delete the existing directory when it detects a new zip (or if the Zip has been deleted). I was speaking more of the current default scenario because today if you use CommandBox to install the plugin, it will download the zip to the directory only and CFWheels takes care of the rest on first load. If you unzip the file yourself and delete the zip without implementing the customization that @risto suggested, you'll lose whatever you commit when the framework loads. I didn't want to confused anyway which is why I mention the default behaviour. The plan being discussed for the next version is to change CFWheels to not need to Zip files and follow the standard CommandBox install which will install all the directories and files into the plugins directory based on what's inside the box.json file and remove anything previous logic relating to Zip files.