-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dignifiedquire/dignified
Use dignified.js
- Loading branch information
Showing
7 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,15 @@ | |
"name": "libp2p", | ||
"version": "0.1.1", | ||
"description": "Node.js implementation of libp2p", | ||
"main": "src/index.js", | ||
"main": "lib/index.js", | ||
"jsnext:main": "src/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"lint": "dignified-lint", | ||
"build": "dignified-build", | ||
"test": "dignified-test", | ||
"test:node": "dignified-test node", | ||
"test:browser": "dignified-test browser", | ||
"release": "dignified-release" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -16,23 +22,25 @@ | |
"engines": { | ||
"node": "^4.0.0" | ||
}, | ||
"pre-commit": [], | ||
"pre-commit": [ | ||
"lint", | ||
"test" | ||
], | ||
"author": "David Dias <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/diasdavid/js-libp2p/issues" | ||
}, | ||
"homepage": "https://github.com/diasdavid/js-libp2p", | ||
"devDependencies": { | ||
"code": "^1.5.0", | ||
"lab": "^5.17.0", | ||
"chai": "^3.5.0", | ||
"dignified.js": "^1.0.0", | ||
"libp2p-spdy": "^0.1.0", | ||
"libp2p-swarm": "^0.5.5", | ||
"libp2p-tcp": "^0.1.2", | ||
"multiaddr": "^1.1.1", | ||
"peer-id": "^0.4.0", | ||
"peer-info": "^0.4.0", | ||
"pre-commit": "^1.1.1", | ||
"standard": "^5.3.1" | ||
"pre-commit": "^1.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
'use strict' | ||
|
||
exports = module.exports = Libp2p | ||
|
||
function Libp2p (swarm, peerRouting, recordStore) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* eslint-env mocha */ | ||
'use strict' | ||
|
||
const expect = require('chai').expect | ||
const Swarm = require('libp2p-swarm') | ||
const Id = require('peer-id') | ||
const Peer = require('peer-info') | ||
|
||
const Node = require('../src') | ||
|
||
describe('libp2p', () => { | ||
it('can be instantiated', () => { | ||
const peer = new Peer(Id.create(), []) | ||
const swarm = new Swarm(peer) | ||
const node = new Node(swarm) | ||
|
||
expect(node.swarm).to.be.eql(swarm) | ||
}) | ||
}) |