added cache buster to nodebb.min.js even if it has not changed

v1.18.x
Julian Lam 11 years ago
parent 5e695d3222
commit 727ad4b651

@ -239,12 +239,12 @@ var fs = require('fs'),
async.parallel({
mtime: function (next) {
async.map(jsPaths, fs.stat, function (err, stats) {
async.reduce(stats, 0, function (memo, item, callback) {
async.reduce(stats, 0, function (memo, item, next) {
if(item) {
mtime = +new Date(item.mtime);
callback(null, mtime > memo ? mtime : memo);
next(null, mtime > memo ? mtime : memo);
} else {
callback(null, memo);
next(null, memo);
}
}, next);
});
@ -262,7 +262,7 @@ var fs = require('fs'),
}, function (err, results) {
if (results.minFile > results.mtime) {
winston.info('No changes to client-side libraries -- skipping minification');
callback(null, [path.relative(path.join(__dirname, '../public'), Meta.js.minFile)]);
callback(null, [path.relative(path.join(__dirname, '../public'), Meta.js.minFile) + (meta.config['cache-buster'] ? '?v=' + meta.config['cache-buster'] : '')]);
} else {
Meta.js.minify(function () {
callback(null, [

Loading…
Cancel
Save