1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 02:42:40 +01:00
phorge-phorge/externals/JsShrink
Joshua Spence dd796a44b6 Update JsShrink external library.
Summary: It seems that there was a [[17cbfacae6 | recent-ish commit]] to the `JsShrink` external library. I'm not sure what this commit actually achieves, but we may as well bring it upstream.

Test Plan: Eyeball it.

Reviewers: vrana, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9414
2014-06-07 11:26:20 -07:00
..
jsShrink.php Update JsShrink external library. 2014-06-07 11:26:20 -07:00
readme.txt Use JsShrink if jsxmin is not available 2013-05-18 17:04:22 -07:00

JsShrink - Remove spaces and comments from JavaScript code
Available in PHP and JavaScript
Requires statements ending by semicolon, use JSHint or JSLint to verify.

http://vrana.github.com/JsShrink/

Usage PHP:
<?php
include "jsShrink.php";
echo jsShrink($code);
?>

Usage JavaScript:
<script type="text/javascript" src="jsShrink.js"></script>
<script type="text/javascript">
textarea.value = jsShrink(code);
</script>

Note:
Google Closure Compiler is much more powerful and efficient tool.
JsShrink was created for those looking for PHP or JavaScript only solution.
Most other JS minifiers are not able to process valid JavaScript code:
http://php.vrana.cz/minifikace-javascriptu.php#srovnani