|
|
|
@ -121,6 +121,7 @@ var path = require('path'),
|
|
|
|
|
// Cache static files on production
|
|
|
|
|
if (global.env !== 'development') {
|
|
|
|
|
app.enable('cache');
|
|
|
|
|
app.enable('minification');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Middlewares
|
|
|
|
@ -136,7 +137,7 @@ var path = require('path'),
|
|
|
|
|
app.use(require('less-middleware')({
|
|
|
|
|
src: path.join(__dirname, '../', 'public'),
|
|
|
|
|
prefix: nconf.get('relative_path'),
|
|
|
|
|
yuicompress: true
|
|
|
|
|
yuicompress: app.enabled('minification') ? true : false
|
|
|
|
|
}));
|
|
|
|
|
app.use(express.bodyParser()); // Puts POST vars in request.body
|
|
|
|
|
app.use(express.cookieParser()); // If you want to parse cookies (res.cookies)
|
|
|
|
@ -206,7 +207,7 @@ var path = require('path'),
|
|
|
|
|
src: path.join(__dirname, '../node_modules/' + themeId),
|
|
|
|
|
dest: path.join(__dirname, '../public/css'),
|
|
|
|
|
prefix: nconf.get('relative_path') + '/css',
|
|
|
|
|
yuicompress: true
|
|
|
|
|
yuicompress: app.enabled('minification') ? true : false
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
next();
|
|
|
|
@ -220,7 +221,7 @@ var path = require('path'),
|
|
|
|
|
src: path.join(__dirname, '../node_modules/nodebb-theme-vanilla'),
|
|
|
|
|
dest: path.join(__dirname, '../public/css'),
|
|
|
|
|
prefix: nconf.get('relative_path') + '/css',
|
|
|
|
|
yuicompress: true
|
|
|
|
|
yuicompress: app.enabled('minification') ? true : false
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
next();
|
|
|
|
|