linting
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- 'node'
|
- '5'
|
||||||
- '4.2'
|
- '4'
|
||||||
|
@ -6,7 +6,6 @@ const commandLineArgs = require('command-line-args')
|
|||||||
const ansi = require('ansi-escape-sequences')
|
const ansi = require('ansi-escape-sequences')
|
||||||
const loadConfig = require('config-master')
|
const loadConfig = require('config-master')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const s = require('string-tools')
|
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
const arrayify = require('array-back')
|
const arrayify = require('array-back')
|
||||||
const t = require('typical')
|
const t = require('typical')
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
"rewrite": [
|
"rewrite": [
|
||||||
{ "from": "/css/*", "to": "/build/styles/$1" },
|
{ "from": "/css/*", "to": "/build/styles/$1" },
|
||||||
{ "from": "/npm/*", "to": "http://registry.npmjs.org/$1" },
|
{ "from": "/npm/*", "to": "http://registry.npmjs.org/$1" },
|
||||||
{ "from": "/:user/repos/:name", "to": "https://api.github.com/repos/:user/:name" }
|
{ "from": "/:user/repos/:name", "to": "https://api.github.com/repos/:user/:name" },
|
||||||
|
{
|
||||||
|
"from": "/lloyd/*",
|
||||||
|
"to": "http://104.131.40.69/$1"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ function mime (mimeTypes) {
|
|||||||
|
|
||||||
function mockResponses (route, targets) {
|
function mockResponses (route, targets) {
|
||||||
targets = arrayify(targets)
|
targets = arrayify(targets)
|
||||||
debug('mock route: %s, targets: %s', route, targets.length);
|
debug('mock route: %s, targets: %s', route, targets.length)
|
||||||
const pathRe = pathToRegexp(route)
|
const pathRe = pathToRegexp(route)
|
||||||
|
|
||||||
return function mockResponse (ctx, next) {
|
return function mockResponse (ctx, next) {
|
||||||
@ -109,7 +109,6 @@ function mockResponses (route, targets) {
|
|||||||
} else {
|
} else {
|
||||||
throw new Error(`Invalid response: ${JSON.stringify(target.response)}`)
|
throw new Error(`Invalid response: ${JSON.stringify(target.response)}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return next()
|
return next()
|
||||||
|
Reference in New Issue
Block a user