js-ipfs-pack
v0.0.2
Published
[![IPFN project](https://img.shields.io/badge/project-IPFN-blue.svg?style=flat-square)](//github.com/ipfn) [![IPFS project](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](//github.com/ipfs) [![Dependency Status](https://david-dm.
Downloads
3
Readme
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-pack
Usage
IPFS daemon should be running.
In node.js package directory run:
$ js-ipfs-pack
QmVmMxoQYNBQ6rskr2ATPs1D6zKijXzMfn2CMf3chQxycR
Usage 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=/ipfs
Known issues
- Dependencies need to be installed first.
- Directories without
package.json
should not be innode_modules
. - Recursive requires (can be resolved in future, when cross-package not cross-file).
- Uploads all dependencies in
node_modules
directory.
TODO
- Organizations includes
@org/pkg
. - Includes like:
require('package/...')
.
License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/