开发者

Are there any static JS concatenation/minification modules for Express.js?

I liked using the Stylus for compres开发者_Go百科sing my CSS stylesheets.

Are there any modules, that, similarly to Stylus, can automatically compress and minify static JS files? I am looking for something to use with Express.js.


You could try the assetmanager middleware: https://github.com/mape/connect-assetmanager

As far as I can tell, it uses jsmin for minifying the javascript: http://www.crockford.com/javascript/jsmin.html


This middlware provides minification for JS files: https://github.com/ncrohn/express-uglify

And this can do JS and CSS as well as some others: https://github.com/breeswish/express-minify

Its dependencies are listed here. Both use uglify-js.

I found them by googling "minify middleware express".


You can try Google's Closure Compiler. You can find an online version here: http://closure-compiler.appspot.com/home

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜