문제

I'm not sure if there is a tool to do this but thought I'd ask.

We are building a Javascript library based on jQuery. As it grows the filesize is becoming quite big. We release both a minified and non-minified version. Or clients want the non-minified version for development as it helps them debug. However, as said, the filesize is quite large now.

Are there any tools that can do some cleaning or compressing without minifying to at least reduce the filesize a little? Maybe simple things like reducing some needless whitespace or formatting the code a little?

Of course in production they will use the minified library but even in DEV they have complained of the large file-size, though we cannot get around that while still adding functionality.

Thank you!

도움이 되었습니까?

해결책

You can use Google's closure compiler http://closure-compiler.appspot.com/ It supports not only minifying but also allows to remove the whitespaces & prettyprint

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top