Skip minification for userscript

This commit is contained in:
Calvin Montgomery 2016-08-30 21:20:42 -07:00
parent d821fc6ccd
commit 84fa7972e3
2 changed files with 8 additions and 1 deletions

View file

@ -2,7 +2,7 @@
"author": "Calvin Montgomery",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "3.21.0",
"version": "3.21.1",
"repository": {
"url": "http://github.com/calzoneman/sync"
},

View file

@ -162,6 +162,13 @@ module.exports = {
if (!fs.existsSync(cacheDir)) {
fs.mkdirSync(cacheDir);
}
app.use((req, res, next) => {
if (/\.user\.js/.test(req.url)) {
res._no_minify = true;
}
next();
});
app.use(require('express-minify')({
cache: cacheDir
}));