Skip to content

Commit

Permalink
chore: remove path-to-regexp dependency
Browse files Browse the repository at this point in the history
Use npm scripts instead of Makefile

closes #2
  • Loading branch information
fengmk2 committed Aug 23, 2015
1 parent 10df52b commit 4f9c8d6
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 100 deletions.
9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
sudo: false
language: node_js
node_js:
- '0.11'
- '3'
- '2'
- '1'
script: "npm run test-travis"
after_script: "npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
3 changes: 2 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
This software is licensed under the MIT License.

Copyright (C) 2014 fengmk2 <fengmk2@gmail.com> and other contributors
Copyright (C) 2015 koajs and other contributors
Copyright (C) 2014 fengmk2 <fengmk2@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
39 changes: 0 additions & 39 deletions Makefile

This file was deleted.

48 changes: 20 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
koa-roles
=======

[![Build Status](https://travis-ci.org/koajs/koa-roles.svg?branch=0.1.0)](https://travis-ci.org/koajs/koa-roles)
[![Dependency Status](https://david-dm.org/koajs/koa-roles.svg)](https://david-dm.org/koajs/koa-roles)

[![NPM](https://nodei.co/npm/koa-roles.png?downloads=true&stars=true)](https://nodei.co/npm/koa-roles/)

![logo](https://raw.github.com/fengmk2/koa-roles/master/logo.png)
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Gittip][gittip-image]][gittip-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/koa-roles.svg?style=flat-square
[npm-url]: https://npmjs.org/package/koa-roles
[travis-image]: https://img.shields.io/travis/koajs/koa-roles.svg?style=flat-square
[travis-url]: https://travis-ci.org/koajs/koa-roles
[coveralls-image]: https://img.shields.io/coveralls/koajs/koa-roles.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koajs/koa-roles?branch=master
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
[gittip-url]: https://www.gittip.com/fengmk2/
[david-image]: https://img.shields.io/david/koajs/koa-roles.svg?style=flat-square
[david-url]: https://david-dm.org/koajs/koa-roles
[download-image]: https://img.shields.io/npm/dm/koa-roles.svg?style=flat-square
[download-url]: https://npmjs.org/package/koa-roles

koa version of [connect-roles](https://github.com/ForbesLindesay/connect-roles)

Expand Down Expand Up @@ -82,25 +95,4 @@ app.listen(3000);

## License

(The MIT License)

Copyright (c) 2014 fengmk2 &lt;fengmk2@gmail.com&gt; and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[MIT](LICENSE.txt)
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* MIT Licensed
*
* Authors:
* 苏千 <suqian.yf@alibaba-inc.com> (http://fengmk2.github.com)
* fengmk2 <m@fengmk2.com> (http://fengmk2.com)
*/

'use strict';
Expand All @@ -15,7 +15,6 @@
*/

var is = require('is-type-of');
var pathToRegexp = require('path-to-regexp');

module.exports = KoaRoles;

Expand Down
Binary file removed logo.png
Binary file not shown.
43 changes: 23 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,51 @@
"version": "1.0.0",
"description": "koa version of Connect-Roles",
"main": "index.js",
"files": [
"index.js"
],
"scripts": {
"test": "make test-all"
},
"config": {
"cov": {
"threshold": 95
}
"test": "mocha --check-leaks -R spec -t 5000 test/*.test.js",
"test-cov": "istanbul cover node_modules/.bin/_mocha -- --check-leaks -t 5000 test/*.test.js",
"test-travis": "npm run lint && istanbul cover node_modules/.bin/_mocha --report lcovonly -- --check-leaks -t 5000 test/*.test.js",
"lint": "eslint .",
"autod": "autod -w --prefix '~'",
"cnpm": "npm install --registry=https://registry.npm.taobao.org",
"contributors": "contributors -f plain -o AUTHORS"
},
"dependencies": {
"is-type-of": "~0.3.1",
"path-to-regexp": "~1.1.1"
"is-type-of": "~0.3.1"
},
"devDependencies": {
"autod": "*",
"co-sleep": "~0.0.1",
"co-sleep": "0",
"contributors": "*",
"cov": "*",
"istanbul-harmony": "*",
"jshint": "*",
"koa": "~0.20.0",
"koa-router": "~4.3.2",
"koa": "1",
"koa-router": "4",
"mocha": "*",
"pedding": "~1.0.0",
"should": "~6.0.1",
"supertest": "~0.15.0"
"pedding": "1",
"should": "7",
"supertest": "0"
},
"homepage": "https://github.com/fengmk2/koa-roles",
"homepage": "https://github.com/koajs/koa-roles",
"repository": {
"type": "git",
"url": "git://github.com/fengmk2/koa-roles.git",
"web": "https://github.com/fengmk2/koa-roles"
"url": "git://github.com/koajs/koa-roles.git",
"web": "https://github.com/koajs/koa-roles"
},
"bugs": {
"url": "https://github.com/fengmk2/koa-roles/issues",
"url": "https://github.com/koajs/koa-roles/issues",
"email": "fengmk2@gmail.com"
},
"keywords": [
"koa-roles", "roles", "role", "connect-roles", "koa"
],
"engines": {
"node": ">= 0.11.9"
"node": ">= 1.0.0"
},
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com)",
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.com)",
"license": "MIT"
}

0 comments on commit 4f9c8d6

Please sign in to comment.