Closed nickjer closed 5 years ago
The goal is to version the cloudcmd dependency code with the rest of the app, since this produces most of the client side code. This will make changes to the app that involve both app.js and the cloudcmd repo much easier, and will also let us experiment with replacing some controls that cloudcmd provides with some simpler options. Note that cloudcmd provides its own dependency list, so if we do this it might be required to add its dependencies to package.json.
Because the cloudcmd dependency is already in node_modules/cloudcmd it would be easier to just move this to a lib/cloudcmd
directory and modify NODE_PATH environment variable. I wonder if you can actually set this at the very top of the app.js file. There are other options too:
NODE_PATH=./lib
prior to executing app.js. I don't know if this works with Passenger.So, it looks like yarn supports multiple package.json files: https://yarnpkg.com/en/docs/workspaces#toc-how-to-use-it
Its another approach that would let us use the cloudcmd dependency as a "workspace". I don't know if you can do subdirectory i.e. lib/cloudcmd/
or if you would just have in the root of the app cloudcmd/
.
Note that yarn is not available with nodejs010 so you would have to wait till we updated to a later version of node.js to do this. And it might make the spec for installing slightly more complex, though bin/setup would just have to handle installing a local copy of yarn if it didn't exist.
This was completed in #180.
I believe it was discussed before, but can't remember the outcome of that discussion. If it is possible it would be beneficial to merge the https://github.com/OSC/cloudcmd/ project into this repo's code to reduce complexity of updating File Explorer.