From 8beb37ed67b5f2fa0f9aa85499a8f11b39c9d067 Mon Sep 17 00:00:00 2001 From: nanalelfe Date: Tue, 26 Jul 2016 20:03:35 -0400 Subject: need pull --- .../express-minify/examples/preserve_comments.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 node_modules/express-minify/examples/preserve_comments.js (limited to 'node_modules/express-minify/examples/preserve_comments.js') diff --git a/node_modules/express-minify/examples/preserve_comments.js b/node_modules/express-minify/examples/preserve_comments.js new file mode 100644 index 0000000..f812d54 --- /dev/null +++ b/node_modules/express-minify/examples/preserve_comments.js @@ -0,0 +1,18 @@ +var minify = require('express-minify'); +var express = require('express'); +var app = express(); + +app.use(function(req, res, next) +{ + if (/\.(user|meta)\.js$/.test(req.url)) { + res._uglifyOutput = { + comments: true + }; + } + next(); +}); + +app.use(minify()); +app.use(express.static(__dirname + '/static')); + +app.listen(8080); \ No newline at end of file -- cgit v1.2.3