Skip to content

Commit 1727cfe

Browse files
committed
Added node 6 support
1 parent 3d4425a commit 1727cfe

File tree

8 files changed

+314
-30
lines changed

8 files changed

+314
-30
lines changed

.babelrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"targets": {
5+
"node": "6.4.0"
6+
}
7+
}]
8+
],
9+
"sourceMaps": "inline"
10+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
node_modules
55
coverage
66
.nyc_output
7+
lib

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: node_js
22
node_js:
3+
- '6'
4+
- '7'
35
- '8'
46
after_success:
57
npm run coverage

package.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "koa-404-handler",
3-
"description": "404 handler for Lad and Koa (best used with koa-better-error-handler)",
3+
"description":
4+
"404 handler for Lad and Koa (best used with koa-better-error-handler)",
45
"version": "0.0.1",
56
"author": "Nick Baugh <[email protected]> (http://niftylettuce.com/)",
67
"bugs": {
@@ -13,6 +14,8 @@
1314
"dependencies": {},
1415
"devDependencies": {
1516
"ava": "^0.22.0",
17+
"babel-cli": "^6.26.0",
18+
"babel-preset-env": "^1.6.1",
1619
"boom": "^7.1.1",
1720
"codecov": "^2.3.0",
1821
"cross-env": "^5.0.5",
@@ -51,16 +54,11 @@
5154
"prettier --write --single-quote --trailing-comma none",
5255
"git add"
5356
],
54-
"*.md": [
55-
"remark . -qfo",
56-
"git add"
57-
]
57+
"*.md": ["remark . -qfo", "git add"]
5858
},
59-
"main": "index.js",
59+
"main": "lib/index.js",
6060
"remarkConfig": {
61-
"plugins": [
62-
"preset-github"
63-
]
61+
"plugins": ["preset-github"]
6462
},
6563
"repository": {
6664
"type": "git",
@@ -70,14 +68,14 @@
7068
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
7169
"lint": "xo && remark . -qfo",
7270
"precommit": "lint-staged && npm test",
73-
"test": "npm run lint && npm run test-coverage",
74-
"test-coverage": "cross-env NODE_ENV=test nyc ava"
71+
"test": "npm run build && npm run lint && npm run test-coverage",
72+
"test-coverage": "cross-env NODE_ENV=test nyc ava",
73+
"build": "node_modules/.bin/babel src --out-dir lib",
74+
"watch": "node_modules/.bin/babel src --watch --out-dir lib"
7575
},
7676
"xo": {
7777
"extends": "prettier",
78-
"plugins": [
79-
"prettier"
80-
],
78+
"plugins": ["prettier"],
8179
"parserOptions": {
8280
"sourceType": "script"
8381
},
File renamed without changes.

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const Router = require('koa-router');
33
const Boom = require('boom');
44
const test = require('ava');
55
const request = require('supertest');
6-
const koa404Handler = require('..');
6+
const koa404Handler = require('../lib');
77

88
const ok = ctx => {
99
ctx.status = 200;

0 commit comments

Comments
 (0)