mirror of https://github.com/webpack/webpack.git
Merge branch 'indent-fix' of https://github.com/SimenB/webpack into SimenB-indent-fix
This commit is contained in:
commit
e74b2f9390
|
@ -2,15 +2,11 @@
|
|||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"plugins": [
|
||||
"nodeca"
|
||||
],
|
||||
"rules": {
|
||||
"strict": 0,
|
||||
"camelcase": 0,
|
||||
"curly": 0,
|
||||
"indent": [0, "tab"],
|
||||
"nodeca/indent": [2, "tabs", 1 ],
|
||||
"indent": [2, "tab", { "SwitchCase": 1 }],
|
||||
"eol-last": 1,
|
||||
"no-shadow": 0,
|
||||
"no-redeclare": 2,
|
||||
|
|
|
@ -29,9 +29,9 @@ if(module.hot) {
|
|||
|
||||
}).catch(function(err) {
|
||||
if(module.hot.status() in {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
console.warn("[HMR] Cannot apply update. Need to do a full reload!");
|
||||
console.warn("[HMR] " + err.stack || err.message);
|
||||
window.location.reload();
|
||||
|
|
|
@ -30,9 +30,9 @@ if(module.hot) {
|
|||
}
|
||||
}).catch(function(err) {
|
||||
if(module.hot.status() in {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
console.warn("[HMR] Cannot apply update. Need to do a full reload!");
|
||||
console.warn("[HMR] " + err.stack || err.message);
|
||||
} else {
|
||||
|
@ -41,9 +41,9 @@ if(module.hot) {
|
|||
});
|
||||
}).catch(function(err) {
|
||||
if(module.hot.status() in {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
console.warn("[HMR] Cannot check for update. Need to do a full reload!");
|
||||
console.warn("[HMR] " + err.stack || err.message);
|
||||
} else {
|
||||
|
|
|
@ -17,9 +17,9 @@ if(module.hot) {
|
|||
checkForUpdate(true);
|
||||
}).catch(function(err) {
|
||||
if(module.hot.status() in {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
console.warn("[HMR] Cannot apply update.");
|
||||
console.warn("[HMR] " + err.stack || err.message);
|
||||
console.warn("[HMR] You need to restart the application!");
|
||||
|
|
|
@ -19,9 +19,9 @@ if(module.hot) {
|
|||
}, function(err, renewedModules) {
|
||||
if(err) {
|
||||
if(module.hot.status() in {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
console.warn("[HMR] Cannot apply update (Need to do a full reload!)");
|
||||
console.warn("[HMR] " + err.stack || err.message);
|
||||
console.warn("[HMR] You need to restart the application!");
|
||||
|
@ -37,9 +37,9 @@ if(module.hot) {
|
|||
});
|
||||
}).catch(function(err) {
|
||||
if(module.hot.status() in {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
abort: 1,
|
||||
fail: 1
|
||||
}) {
|
||||
console.warn("[HMR] Cannot apply update.");
|
||||
console.warn("[HMR] " + err.stack || err.message);
|
||||
console.warn("[HMR] You need to restart the application!");
|
||||
|
|
|
@ -179,10 +179,10 @@ NormalModule.prototype.build = function build(options, compilation, resolver, fs
|
|||
if(options.module && options.module.noParse) {
|
||||
if(Array.isArray(options.module.noParse)) {
|
||||
if(options.module.noParse.some(function(regExp) {
|
||||
return typeof regExp === "string" ?
|
||||
return typeof regExp === "string" ?
|
||||
this.request.indexOf(regExp) === 0 :
|
||||
regExp.test(this.request);
|
||||
}, this)) return callback();
|
||||
}, this)) return callback();
|
||||
} else if(typeof options.module.noParse === "string" ?
|
||||
this.request.indexOf(options.module.noParse) === 0 :
|
||||
options.module.noParse.test(this.request)) {
|
||||
|
@ -231,8 +231,8 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
|
|||
var name = variable.name;
|
||||
var expr = variable.expressionSource(dependencyTemplates, outputOptions, requestShortener);
|
||||
if(availableVars.some(function(v) {
|
||||
return v.name === name && v.expression.source() === expr.source();
|
||||
})) return;
|
||||
return v.name === name && v.expression.source() === expr.source();
|
||||
})) return;
|
||||
vars.push({
|
||||
name: name,
|
||||
expression: expr
|
||||
|
|
|
@ -338,8 +338,8 @@ Parser.prototype.initializeEvaluating = function() {
|
|||
return element !== null && this.evaluateExpression(element);
|
||||
}, this);
|
||||
if(items.filter(function(i) {
|
||||
return !i;
|
||||
}).length > 0) return;
|
||||
return !i;
|
||||
}).length > 0) return;
|
||||
return new BasicEvaluatedExpression().setItems(items).setRange(expr.range);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -65,8 +65,8 @@ Template.prototype.asString = function(str) {
|
|||
|
||||
Template.prototype.getModulesArrayBounds = function(modules) {
|
||||
if(modules.some(function(module) {
|
||||
return typeof module.id !== "number";
|
||||
}))
|
||||
return typeof module.id !== "number";
|
||||
}))
|
||||
return false;
|
||||
var maxId = -Infinity;
|
||||
var minId = Infinity;
|
||||
|
|
|
@ -44,8 +44,8 @@ function debugIds(chunks) {
|
|||
return chunk.debugId;
|
||||
});
|
||||
if(list.some(function(dId) {
|
||||
return typeof dId !== "number";
|
||||
})) return "no";
|
||||
return typeof dId !== "number";
|
||||
})) return "no";
|
||||
list.sort();
|
||||
return list.join(",");
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
"diff": "^2.0.2",
|
||||
"es6-promise-polyfill": "^1.1.1",
|
||||
"eslint": "^1.1.0",
|
||||
"eslint-plugin-nodeca": "^1.0.3",
|
||||
"express": "~4.13.1",
|
||||
"extract-text-webpack-plugin": "^1.0.0",
|
||||
"file-loader": "~0.8.0",
|
||||
|
|
Loading…
Reference in New Issue