lint
This commit is contained in:
parent
c0dbb8635c
commit
1fe4a08e71
3 changed files with 4 additions and 4 deletions
|
|
@ -130,7 +130,7 @@ function run(input, output) {
|
||||||
module.exports = function(input, output, options) {
|
module.exports = function(input, output, options) {
|
||||||
run(input, output)
|
run(input, output)
|
||||||
if (options && options.watch) {
|
if (options && options.watch) {
|
||||||
fs.watch(process.cwd(), {recursive: true}, function(file, type) {
|
fs.watch(process.cwd(), {recursive: true}, function(file) {
|
||||||
if (typeof file === "string" && path.resolve(output) !== path.resolve(file)) run(input, output)
|
if (typeof file === "string" && path.resolve(output) !== path.resolve(file)) run(input, output)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ module.exports = function($window, Promise) {
|
||||||
function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()}
|
function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()}
|
||||||
|
|
||||||
return function finalize(promise) {
|
return function finalize(promise) {
|
||||||
var then = promise.then, catcher = promise.catch
|
var then = promise.then
|
||||||
promise.then = function() {
|
promise.then = function() {
|
||||||
count++
|
count++
|
||||||
var next = then.apply(promise, arguments)
|
var next = then.apply(promise, arguments)
|
||||||
|
|
@ -87,7 +87,7 @@ module.exports = function($window, Promise) {
|
||||||
if (useBody && (args.data != null)) xhr.send(args.data)
|
if (useBody && (args.data != null)) xhr.send(args.data)
|
||||||
else xhr.send()
|
else xhr.send()
|
||||||
})
|
})
|
||||||
return args.background === true ? promise : finalize(promise)
|
return args.background === true ? promise : finalize(promise)
|
||||||
}
|
}
|
||||||
|
|
||||||
function jsonp(args, extra) {
|
function jsonp(args, extra) {
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ module.exports = function($window) {
|
||||||
for (var i = 0; i < keys.length; i++) {
|
for (var i = 0; i < keys.length; i++) {
|
||||||
params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i])
|
params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i])
|
||||||
}
|
}
|
||||||
resolve(routes[route], params, path, route, !!isRouteChange)
|
resolve(routes[route], params, path, route, Boolean(isRouteChange))
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue