Skip to content

Commit

Permalink
feat: clone
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jun 29, 2016
1 parent 8047029 commit 8348f69
Show file tree
Hide file tree
Showing 12 changed files with 280 additions and 336 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ npm on IPFS
[![Dependency Status](https://david-dm.org/diasdavid/registry-mirror.svg?style=flat-square)](https://david-dm.org/diasdavid/registry-mirror)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](https://img.shields.io/badge/coverage-76%25-yellow.svg?style=flat-square)
<!-- While 0.4.0 doesn't get released [![Build Status](https://img.shields.io/travis/diasdavid/registry-mirror/master.svg?style=flat-square)](https://travis-ci.org/diasdavid/registry-mirror) -->
[![Build Status](https://img.shields.io/travis/diasdavid/registry-mirror/master.svg?style=flat-square)](https://travis-ci.org/diasdavid/registry-mirror)

> **Install your modules through IPFS!!** This CLI utility enables you to clone the npm registry into IPFS and/or mirror the registry from IPFS.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"express": "^4.12.3",
"follow-registry": "^2.0.0",
"http-https": "^1.0.0",
"ipfs-blob-store": "^1.1.0",
"ipfs-blob-store": "^1.1.1",
"lru-cache": "^4.0.1",
"patch-package-json": "0.0.4",
"ronin": "^0.3.11",
Expand Down
4 changes: 1 addition & 3 deletions src/ipfs-npm/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const ipfsAPI = require('ipfs-api')
const debug = require('debug')
const path = require('path')
const os = require('os')
Expand All @@ -9,7 +8,6 @@ const tmp = os.tmpdir()

module.exports = {
log: log,
apiCtl: ipfsAPI('/ip4/127.0.0.1/tcp/5001'),
nodes: {
biham: '/ip4/188.40.114.11/tcp/8801/ipfs/QmToeN85brexqyXUnWnKfHFqhvucJPViw9AxQQkjLoULy4'
},
Expand All @@ -18,7 +16,7 @@ module.exports = {
port: '9876',
host: '127.0.0.1'
},
limit: 10,
writeLimit: 100,
registry: 'http://registry.npmjs.org/',
tmp: tmp,
error: path.join(__dirname, '../defaults', '404.json'),
Expand Down
17 changes: 17 additions & 0 deletions src/ipfs-npm/ipfs-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const ipfsAPI = require('ipfs-api')

module.exports = ipfs

function ipfs (options) {
if (!options || !options.url) {
options = {
url: '/ip4/127.0.0.1/tcp/5001'
}
}

// TODO
// 1. check if there is a node running (through IPFS_PATH)
// if not, spawn one

return ipfsAPI(options.url)
}
146 changes: 0 additions & 146 deletions src/ipfs-npm/registry-clone/clone.js

This file was deleted.

84 changes: 0 additions & 84 deletions src/ipfs-npm/registry-clone/files.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/ipfs-npm/registry-clone/hooks.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/ipfs-npm/registry-clone/ibs.js

This file was deleted.

Loading

0 comments on commit 8348f69

Please sign in to comment.