Skip to content

Commit

Permalink
update to koa v2 and add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Feb 25, 2017
1 parent 3fb0f94 commit 501691f
Show file tree
Hide file tree
Showing 6 changed files with 724 additions and 223 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
.nyc_output
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
language: node_js
sudo: false
language: node_js
node_js:
- "7"
- "6"
- "4"
script: npm run coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Scott Cooper
Copyright (c) 2017 Scott Cooper

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
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

[![NPM version][npm-image]][npm-url]
[![build status][travis-img]][travis-url]
[![Dependency Status][david-img]][david-url]
[![coverage][coverage-img]][coverage-url]
[![greenkeeper][greenkeeper-img]][greenkeeper-url]

[npm-image]: https://img.shields.io/npm/v/koa2-swagger-ui.svg
[npm-url]: https://npmjs.org/package/koa2-swagger-ui
[travis-img]: https://travis-ci.org/scttcper/koa2-swagger-ui.svg
[travis-url]: https://travis-ci.org/scttcper/koa2-swagger-ui
[david-img]: https://img.shields.io/david/scttcper/koa2-swagger-ui.svg
[david-url]: https://david-dm.org/scttcper/koa2-swagger-ui
[coverage-img]: https://codecov.io/gh/scttcper/koa2-swagger-ui/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/gh/scttcper/koa2-swagger-ui
[greenkeeper-img]: https://badges.greenkeeper.io/scttcper/koa2-swagger-ui.svg
[greenkeeper-url]: https://greenkeeper.io/

Host swagger ui at a given directory from your koa v2 app.

Expand Down
52 changes: 30 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
{
"name": "koa2-swagger-ui",
"version": "1.0.1",
"version": "1.0.2",
"description": "Swagger UI middleware for koa",
"main": "lib/index.js",
"scripts": {
"test": "mocha test/*.js",
"start": "nodemon examples/example.js"
"start": "nodemon examples/example.js",
"coverage": "nyc npm test"
},
"dependencies": {
"handlebars": "^4.0.6",
"koa-send": "^3.3.0",
"lodash.defaultsdeep": "^4.6.0",
"swagger-ui": "^2.2.10"
},
"peerDependencies": {
"koa": "^2.0.1"
},
"devDependencies": {
"eslint": "^3.16.1",
"eslint-config-airbnb-base": "^11.1.0",
"eslint-plugin-import": "^2.2.0",
"koa": "^2.0.1",
"mocha": "^3.2.0",
"mocha-eslint": "^3.0.1",
"nodemon": "^1.11.0",
"nyc": "^10.1.2",
"supertest": "^3.0.0"
},
"nyc": {
"reporter": [
"lcov",
"text"
]
},
"homepage": "https://github.com/scttcper/koa2-swagger-ui",
"repository": {
"type": "git",
"url": "https://github.com/scttcper/koa2-swagger-ui"
Expand All @@ -22,25 +50,5 @@
"license": "MIT",
"bugs": {
"url": "https://github.com/scttcper/koa2-swagger-ui/issues"
},
"homepage": "https://github.com/scttcper/koa2-swagger-ui",
"devDependencies": {
"eslint": "^3.12.0",
"eslint-config-airbnb-base": "^11.0.0",
"eslint-plugin-import": "^2.2.0",
"koa": "^2.0.0-alpha.7",
"mocha": "^3.2.0",
"mocha-eslint": "^3.0.1",
"nodemon": "^1.11.0",
"supertest": "^3.0.0"
},
"peerDependencies": {
"koa": "^2.0.0-alpha.7"
},
"dependencies": {
"handlebars": "^4.0.6",
"koa-send": "^3.2.0",
"lodash.defaultsdeep": "^4.6.0",
"swagger-ui": "^2.2.8"
}
}
Loading

0 comments on commit 501691f

Please sign in to comment.