Skip to content

Instantly share code, notes, and snippets.

@arei
Created May 20, 2013 04:03
Show Gist options
  • Save arei/5610362 to your computer and use it in GitHub Desktop.
Save arei/5610362 to your computer and use it in GitHub Desktop.
Describes the npm offline/disconnected install problem and how npmbox is trying to solve it.
I believe I have failed to state my case clearly, so here is the scenario with which I am faced...
Imagine two networks: NETWORK A and NETWORK B.
NETWORK A is a traditional on the Internet network we all use every day. There are no limitations to what we can do on machines connected to NETWORK A.
NETWORK B is a completely disconnected and isolated network that is not on the Internet and can never be connected to the Internet. Ever.
The only way to move data between A and B is by physical media and sneakernet.
When some npm package is required on NETWORK B someone must go to NETWORK A, install the package into a new folder, tar that up, delete the installation but not the tar file, physically move the tar file to NETWORK B, untar the file on NETWORK B, and copy the node_modules folder into the existing or new project. This does not allow for npm to be used as the installing agent on NETWORK B. It does not allow for global installs. It does not create a very clean/repeatable process.
The goal of npmbox is to easily bundle an npm package into a special type of tar fils. This file can then be copied to NETWORK B and npmunbox (and thus npm) can be used as the installing agent. Because npm is used, global installs would be possible (although not yet in the current version of npmunbox). Finally, the .npmbox file is a more cleanly repeatable process.
npmbox essentially creates a micro-repository from which something can be installed on NETWORK B or wherever the .npmbox file is used.
I'm not trying to be argumentative or obtuse. I am very interested in how you propose to provide this behavior with a version control system. I admit I am something of a git newbie, so if there is some behavior of git that I am not understanding, please do enlighten me.
Thanks.
Ps. If you are going to JSConf please look me up and I will buy beer and discuss further.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment