paths: {
"requireLib": "require",
- "jquery": "empty:",
+ "jquery": "empty:"
},
include: [
- "requireLib",
+ "requireLib"
],
excludeShallow: [
- 'WoltLab/_Meta',
+ 'WoltLab/_Meta'
],
rawText: {
- 'WoltLab/_Meta': 'define([], function () {});',
+ 'WoltLab/_Meta': 'define([], function() {});'
},
- onBuildRead: function (moduleName, path, contents) {
+ onBuildRead: function(moduleName, path, contents) {
if (!process.versions.node) {
throw new Error('You need to run node.js');
}
if (moduleName === 'WoltLab/_Meta') {
if (global.allModules == undefined) {
- var fs = module.require('fs')
- , path = module.require('path');
+ var fs = module.require('fs'),
+ path = module.require('path');
global.allModules = [];
- var queue = [ 'WoltLab' ];
+
+ var queue = ['WoltLab'];
var folder;
while (folder = queue.shift()) {
var files = fs.readdirSync(folder);
for (var i = 0; i < files.length; i++) {
var filename = path.join(folder, files[i]);
+
if (path.extname(filename) == '.js') {
global.allModules.push(filename);
}
}
}
- return 'define([' + global.allModules.map(function (item) { return "'" + item.replace(/\\/g, '\\\\').replace(/'/g, "\\'") + "'"; }).join(', ') + '], function () { });';
+ return 'define([' + global.allModules.map(function (item) { return "'" + item.replace(/\\/g, '\\\\').replace(/'/g, "\\'") + "'"; }).join(', ') + '], function() { });';
}
return contents;
- },
+ }
})