Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use aegir #5

Merged
merged 1 commit into from
Sep 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

lib
dist
29 changes: 29 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

test
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sudo: false
language: node_js
node_js:
- 4
- 5

# Make sure we have new NPM.
before_install:
- npm install -g npm

script:
- npm run lint
- npm test
- npm run coverage

after_success:
- npm run coverage-publish
3 changes: 3 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
machine:
node:
version: stable
20 changes: 15 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
"name": "libp2p-utp",
"version": "0.1.0",
"description": "Node.js implementation of the µTP module that libp2p uses, which implements the abstract-connection interface",
"main": "src/index.js",
"main": "lib/index.js",
"scripts": {
"test": "node tests/test-ac.js"
"lint": "aegir-lint",
"test": "aegir-test node",
"build": "aegir-build only-node",
"release": "aegir-release only-node",
"coverage": "aegir-coverage",
"coverage-publish": "aegir-coverage publish"
},
"pre-commit": [],
"pre-commit": [
"lint",
"test"
],
"repository": {
"type": "git",
"url": "https://github.com/diasdavid/js-libp2p-utp.git"
Expand All @@ -20,14 +28,16 @@
},
"homepage": "https://github.com/diasdavid/js-libp2p-utp",
"devDependencies": {
"aegir": "^2.1.1",
"chai": "^3.5.0",
"interface-connection": "^0.0.3",
"interface-transport": "^0.1.1",
"pre-commit": "^1.1.2",
"standard": "^5.4.1",
"tape": "^4.4.0"
},
"dependencies": {
"multiaddr": "^1.1.0",
"utp-native": "^1.2.2"
}
},
"jsnext:main": "src/index.js"
}
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict'

var utp = require('utp-native')

exports = module.exports
Expand Down
20 changes: 20 additions & 0 deletions test/interface-connection.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-env mocha */
'use strict'

var tape = require('tape')
var tests = require('interface-connection/tests')
var conn = require('../src')

describe('interface-connection', () => {
it('works', (done) => {
tests(tape, {
setup (t, cb) {
cb(null, conn)
},
teardown (t, cb) {
done()
cb()
}
})
})
})
20 changes: 20 additions & 0 deletions test/interface-transport.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-env mocha */
'use strict'

var tape = require('tape')
var tests = require('interface-transport/tests')
var conn = require('../src')

describe('interface-transport', () => {
it('works', (done) => {
tests(tape, {
setup (t, cb) {
cb(null, conn)
},
teardown (t, cb) {
done()
cb()
}
})
})
})
14 changes: 0 additions & 14 deletions tests/test-ac.js

This file was deleted.

14 changes: 0 additions & 14 deletions tests/test-at.js

This file was deleted.