1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00
phorge-phorge/externals/JsShrink
Merula Turdus 214988fafd T15774: Celerity: javascript minification issue with template literals (backticked strings)
Test Plan:
This archive contains a small demo: {F2142567}
When installed, an application named D25571 appears under "More Applications".
When you start it, you will see 2 messageboxes: one should be a single lined text, the other a multilined text.

Steps:
1) unpack archive in some directory
2) add ext-D25571/src/ path to load-libraries in local.json
3) bin/arc liberate
4) bin/cache purge --all
5) bin/celerity map
6) restart httpd
7) start D25571 application from More Applications

Also:

    arc unit ./src/applications/celerity/__tests__/CelerityResourceTransformerTestCase.php

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15774

Differential Revision: https://we.phorge.it/D25571
2024-06-11 17:09:47 +02:00
..
jsShrink.php T15774: Celerity: javascript minification issue with template literals (backticked strings) 2024-06-11 17:09:47 +02: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