0.0.2 • Published 8 years ago
js-ipfs-pack v0.0.2
IPFS JavaScript source code packer
Uploads npm packages to IPFS.
Converts occurences of require('package') in source code to require('Qm...').
Install
$ npm install -g js-ipfs-packUsage
IPFS daemon should be running.
In node.js package directory run:
$ js-ipfs-pack
QmVmMxoQYNBQ6rskr2ATPs1D6zKijXzMfn2CMf3chQxycRUsage in code can be found in tests.
Running
IPFS should be mounted at /ipfs and NODE_PATH should point to it.
$ ipfs mount
IPFS mounted at: /ipfs
IPNS mounted at: /ipns
$ export NODE_PATH=/ipfsKnown issues
- Dependencies need to be installed first.
- Directories without
package.jsonshould not be innode_modules. - Recursive requires (can be resolved in future, when cross-package not cross-file).
- Uploads all dependencies in
node_modulesdirectory.
TODO
- Organizations includes
@org/pkg. - Includes like:
require('package/...').
License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/