Remove IIFE in all scripts

It is not required by node.js, but introduce troubles while
generating documents with jsdoc3.

Refer to https://github.com/jsdoc3/jsdoc/issues/456

Change-Id: I6664f1be0fc3e86f3a7e3843d557786c37df1c5e
This commit is contained in:
Yujun Zhang 2016-06-29 13:56:17 +08:00
parent 9a7e0c3a6e
commit 5c9e5bbeaf
26 changed files with 2550 additions and 2586 deletions

View File

@ -2,3 +2,5 @@ extends: openstack
env:
node: true
jasmine: true
rules:
strict: ["error", "global"]

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var yeoman = require('yeoman-generator');
@ -128,4 +127,3 @@
this.npmInstall();
}
});
})();

View File

@ -13,8 +13,6 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
(function () {
'use strict';
var projectBuilder = require('../project_builder');
@ -45,4 +43,3 @@
prompt: noop,
configure: configureEC
};
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var pkgBuilder = require('../pkg_builder');
@ -125,4 +124,3 @@
prompt: promptEslint,
configure: configureEslint
};
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function() {
'use strict';
var projectBuilder = require('../project_builder');
@ -143,5 +142,3 @@
prompt: promptUserOptions,
configure: configureGerrit
};
})
();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var projectBuilder = require('../project_builder');
@ -102,4 +101,3 @@
prompt: noop,
configure: configureGitIgnore
};
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var projectBuilder = require('../project_builder');
@ -48,4 +47,3 @@
prompt: noop,
configure: configureLicense
};
})();

View File

@ -19,7 +19,7 @@
* Its job is to identify known vulnerabilities by scanning the projects
* source and dependencies.
*/
(function () {
'use strict';
var projectBuilder = require('../project_builder');
@ -68,4 +68,3 @@
prompt: promptNsp,
configure: configureNsp
};
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var Q = require('q');
@ -120,4 +119,3 @@
prompt: promptPackage,
configure: configurePkg
};
})();

View File

@ -20,7 +20,7 @@
* other generators, such as test framework generation, packaging tools,
* and/or configuration files.
*/
(function () {
'use strict';
var Q = require('q');
@ -136,4 +136,3 @@
prompt: prompt,
configure: configure
};
})();

View File

@ -13,11 +13,10 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
/**
* Access to the global-dependencies.json file.
*/
(function () {
'use strict';
var globalDependencies = require('../../../global-dependencies.json');
@ -66,4 +65,3 @@
read: getVersion,
synchronize: synchronizeDependencies
};
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var dependencies = require('./global_dependencies');
@ -163,4 +162,3 @@
addDependencies: addDependencies,
addCommand: addCommand
};
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
var includedFiles = [];
@ -115,4 +114,3 @@
getExcludedFiles: getExcludedFiles,
clear: clearAll
};
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');
@ -110,4 +110,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var editorconfig = require(libDir + '/component/editorconfig');
@ -85,4 +85,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var mockGenerator;
var mockEslintIgnore = ['node_modules', 'bower_components', 'dist'];
@ -261,4 +261,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var ini = require('ini');
@ -270,4 +270,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var gitignore = require(libDir + '/component/gitignore');
@ -220,4 +220,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var license = require(libDir + '/component/license');
@ -94,4 +94,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var nsp = require(libDir + '/component/nsp');
@ -106,4 +106,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var pkg = require(libDir + '/component/pkg');
@ -187,4 +187,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var libDir = '../../../../generators/app/lib';
var structure = require(libDir + '/component/structure');
@ -179,4 +179,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var builder = require('../../../generators/app/lib/global_dependencies');
var globals = require('../../../global-dependencies.json');
var semver = require('semver');
@ -92,4 +92,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var builder = require('../../../generators/app/lib/pkg_builder');
var dependencies = require('../../../generators/app/lib/global_dependencies');
@ -224,4 +224,3 @@
});
});
});
})();

View File

@ -14,8 +14,8 @@
* under the License.
*/
(function () {
'use strict';
var builder = require('../../../generators/app/lib/project_builder');
describe('generator-openstack:lib/project_builder', function () {
@ -71,4 +71,3 @@
expect(builder.getIgnoredFiles()[0]).toBe(testFilePath);
});
});
})();

View File

@ -14,7 +14,6 @@
* under the License.
*/
(function () {
'use strict';
function buildMockGenerator (config, mockAnswers, mockOptions) {
@ -77,4 +76,3 @@
module.exports = {
buildGenerator: buildMockGenerator
};
})();