if dev, compile view scripts only; let rjs dynamically load module scripts

fixes a bug introduced @ 11c83079f2
This commit is contained in:
psychobunny
2014-11-11 13:53:32 -05:00
parent 9726e599e4
commit 70b5c631c6

View File

@@ -54,10 +54,6 @@ module.exports = function(Meta) {
};
Meta.js.loadRJS = function(callback) {
if (global.env === 'development') {
return callback();
}
var rjsPath = path.join(__dirname, '../../public/src');
async.parallel({
@@ -65,6 +61,10 @@ module.exports = function(Meta) {
utils.walk(path.join(rjsPath, 'client'), next);
},
modules: function(next) {
if (global.env === 'development') {
return next(null, []);
}
utils.walk(path.join(rjsPath, 'modules'), next);
}
}, function(err, rjsFiles) {