fix 'no-inner-declarations' warnings
This commit is contained in:
parent
6791adbfef
commit
6b39a5325c
|
@ -53,7 +53,7 @@ module.exports = function(optimist, argv, convertOptions) {
|
|||
|
||||
var i;
|
||||
if(argv.config) {
|
||||
function getConfigExtension(configPath) {
|
||||
var getConfigExtension = function getConfigExtension(configPath) {
|
||||
for(i = extensions.length - 1; i >= 0; i--) {
|
||||
var tmpExt = extensions[i];
|
||||
if(configPath.indexOf(tmpExt, configPath.length - tmpExt.length) > -1) {
|
||||
|
@ -63,7 +63,7 @@ module.exports = function(optimist, argv, convertOptions) {
|
|||
return path.extname(configPath);
|
||||
}
|
||||
|
||||
function mapConfigArg(configArg) {
|
||||
var mapConfigArg = function mapConfigArg(configArg) {
|
||||
var resolvedPath = path.resolve(configArg);
|
||||
var extension = getConfigExtension(resolvedPath);
|
||||
return {
|
||||
|
@ -88,7 +88,7 @@ module.exports = function(optimist, argv, convertOptions) {
|
|||
}
|
||||
|
||||
if(configFiles.length > 0) {
|
||||
function registerCompiler(moduleDescriptor) {
|
||||
var registerCompiler = function registerCompiler(moduleDescriptor) {
|
||||
if(moduleDescriptor) {
|
||||
if(typeof moduleDescriptor === "string") {
|
||||
require(moduleDescriptor);
|
||||
|
@ -107,7 +107,7 @@ module.exports = function(optimist, argv, convertOptions) {
|
|||
}
|
||||
}
|
||||
|
||||
function requireConfig(configPath) {
|
||||
var requireConfig = function requireConfig(configPath) {
|
||||
var options = require(configPath);
|
||||
var isES6DefaultExportedFunc = (
|
||||
typeof options === "object" && options !== null && typeof options.default === "function"
|
||||
|
@ -538,7 +538,7 @@ module.exports = function(optimist, argv, convertOptions) {
|
|||
}
|
||||
ensureObject(options, "entry");
|
||||
|
||||
function addTo(name, entry) {
|
||||
var addTo = function addTo(name, entry) {
|
||||
if(options.entry[name]) {
|
||||
if(!Array.isArray(options.entry[name])) {
|
||||
options.entry[name] = [options.entry[name]];
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
if(module.hot) {
|
||||
var hotPollInterval = +(__resourceQuery.substr(1)) || (10 * 60 * 1000);
|
||||
|
||||
function checkForUpdate(fromUpdate) {
|
||||
var checkForUpdate = function checkForUpdate(fromUpdate) {
|
||||
if(module.hot.status() === "idle") {
|
||||
module.hot.check(true).then(function(updatedModules) {
|
||||
if(!updatedModules) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
/*globals __resourceQuery */
|
||||
if(module.hot) {
|
||||
function checkForUpdate(fromUpdate) {
|
||||
var checkForUpdate = function checkForUpdate(fromUpdate) {
|
||||
module.hot.check().then(function(updatedModules) {
|
||||
if(!updatedModules) {
|
||||
if(fromUpdate)
|
||||
|
|
|
@ -183,7 +183,7 @@ NormalModule.prototype.build = function build(options, compilation, resolver, fs
|
|||
_this._cachedSource = null;
|
||||
if(err) return setError(err);
|
||||
if(options.module && options.module.noParse) {
|
||||
function testRegExp(regExp) {
|
||||
var testRegExp = function testRegExp(regExp) {
|
||||
return typeof regExp === "string" ?
|
||||
_this.request.indexOf(regExp) === 0 :
|
||||
regExp.test(_this.request);
|
||||
|
@ -267,7 +267,7 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
|
|||
var varStartCode = "";
|
||||
var varEndCode = "";
|
||||
|
||||
function emitFunction() {
|
||||
var emitFunction = function emitFunction() {
|
||||
if(varNames.length === 0) return;
|
||||
|
||||
varStartCode += "/* WEBPACK VAR INJECTION */(function(" + varNames.join(", ") + ") {";
|
||||
|
|
|
@ -38,7 +38,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
|
|||
var doneModules = 0;
|
||||
var activeModules = [];
|
||||
|
||||
function update(module) {
|
||||
var update = function update(module) {
|
||||
handler(
|
||||
0.1 + (doneModules / Math.max(lastModulesCount, moduleCount)) * 0.6,
|
||||
"building modules",
|
||||
|
@ -48,7 +48,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
|
|||
);
|
||||
}
|
||||
|
||||
function moduleDone(module) {
|
||||
var moduleDone = function moduleDone(module) {
|
||||
doneModules++;
|
||||
var ident = module.identifier();
|
||||
if(ident) {
|
||||
|
|
Loading…
Reference in New Issue