diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 00:03:35 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 00:03:35 +0000 |
| commit | 8beb37ed67b5f2fa0f9aa85499a8f11b39c9d067 (patch) | |
| tree | bd4b05a1e374b6cb10097bbcfbc12ef51c1cb85b /node_modules/express-minify/examples/preserve_comments.js | |
| parent | 5e73fe37c32faf821d3d16f0251007e366cb090b (diff) | |
need pull
Diffstat (limited to 'node_modules/express-minify/examples/preserve_comments.js')
| -rw-r--r-- | node_modules/express-minify/examples/preserve_comments.js | 18 |
1 files changed, 18 insertions, 0 deletions
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 |
