making the loading sequence less verbose

in particular, the js stuff all happened sequentially at the same time
so there was no need for multiple messages
This commit is contained in:
psychobunny
2014-10-08 15:05:02 -04:00
parent 6418948570
commit f35a51e48d
3 changed files with 5 additions and 12 deletions

View File

@@ -74,7 +74,6 @@ module.exports = function(Meta) {
});
}
winston.info('[meta/css] Done.');
emitter.emit('meta:css.compiled');
if (typeof callback === 'function') {
@@ -90,10 +89,11 @@ module.exports = function(Meta) {
};
Meta.css.commitToFile = function(filename) {
winston.info('[meta/css] Committing stylesheet (' + filename + ') to disk');
fs.writeFile(path.join(__dirname, '../../public/' + (filename === 'acpCache' ? 'admin' : 'stylesheet') + '.css'), Meta.css[filename], function(err) {
var file = (filename === 'acpCache' ? 'admin' : 'stylesheet') + '.css';
fs.writeFile(path.join(__dirname, '../../public/' + file), Meta.css[filename], function(err) {
if (!err) {
winston.info('[meta/css] Stylesheet (' + filename + ') committed to disk.');
winston.info('[meta/css] ' + file + ' committed to disk.');
} else {
winston.error('[meta/css] ' + err.message);
process.exit(0);

View File

@@ -135,7 +135,7 @@ module.exports = function(Meta) {
process.exit(0);
}
winston.info('[meta/js] Compilation complete');
winston.info('[meta/js] Minification complete');
minifier.kill();
if (cluster.isWorker) {
@@ -156,9 +156,6 @@ module.exports = function(Meta) {
minifier.on('message', function(message) {
switch(message.type) {
case 'end':
winston.info('[meta/js] Successfully minified.');
winston.info('[meta/js] Retrieved Mapping.');
Meta.js.cache = message.data.js;
Meta.js.map = message.data.map;
@@ -202,7 +199,6 @@ module.exports = function(Meta) {
};
Meta.js.commitToFile = function() {
winston.info('[meta/js] Committing minfile to disk');
async.parallel([
async.apply(fs.writeFile, path.join(__dirname, '../../public/nodebb.min.js'), Meta.js.cache),
async.apply(fs.writeFile, path.join(__dirname, '../../public/nodebb.min.js.map'), Meta.js.map)

View File

@@ -108,9 +108,6 @@ var fs = require('fs'),
});
},
function(next) {
if (global.env === 'development') {
winston.info('[plugins] Sorting hooks to fire in priority sequence');
}
Object.keys(Plugins.loadedHooks).forEach(function(hook) {
var hooks = Plugins.loadedHooks[hook];
hooks = hooks.sort(function(a, b) {