mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
Merge remote-tracking branch 'origin/master' into socket.io1.x
This commit is contained in:
@@ -156,11 +156,8 @@ module.exports = function(Meta) {
|
||||
minifier.on('message', function(message) {
|
||||
switch(message.type) {
|
||||
case 'end':
|
||||
Meta.js.cache = message.data.js;
|
||||
Meta.js.map = message.data.map;
|
||||
|
||||
Meta.js.cache = message.minified;
|
||||
onComplete();
|
||||
|
||||
break;
|
||||
case 'hash':
|
||||
Meta.js.hash = message.payload;
|
||||
@@ -180,7 +177,6 @@ module.exports = function(Meta) {
|
||||
Meta.js.prepare(function() {
|
||||
minifier.send({
|
||||
action: 'js',
|
||||
relativePath: nconf.get('url') + '/',
|
||||
minify: global.env !== 'development',
|
||||
scripts: Meta.js.scripts.all
|
||||
});
|
||||
@@ -200,11 +196,10 @@ module.exports = function(Meta) {
|
||||
|
||||
Meta.js.commitToFile = function() {
|
||||
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)
|
||||
async.apply(fs.writeFile, path.join(__dirname, '../../public/nodebb.min.js'), Meta.js.cache)
|
||||
], function (err) {
|
||||
if (!err) {
|
||||
winston.verbose('[meta/js] Client-side minfile and mapping committed to disk.');
|
||||
winston.verbose('[meta/js] Client-side minfile committed to disk.');
|
||||
emitter.emit('meta:js.compiled');
|
||||
} else {
|
||||
winston.error('[meta/js] ' + err.message);
|
||||
|
||||
Reference in New Issue
Block a user