DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:ckgedit:compress.sh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:ckgedit:compress.sh [2017-07-27 19:57] – [Usage:] turnermmplugin:ckgedit:compress.sh [2020-01-14 15:06] (current) turnermm
Line 1: Line 1:
 +====== Compressing Files ======
 +
 +[[plugin:ckgedit#compression|⇐ ckgedit Plugin Page]]
 +
 <code bash any_compr.sh> <code bash any_compr.sh>
 #!/bin/sh #!/bin/sh
Line 6: Line 10:
 then then
 OUT=$2 OUT=$2
 +EXTENSION=` echo $1 | awk -F. '{ print $2 }' `
 else else
 BASENAME=` echo $1 |  awk -F. '{ print $1 }' ` BASENAME=` echo $1 |  awk -F. '{ print $1 }' `
Line 17: Line 22:
  
 </code> </code>
-This script will compress both .js and .css files.+This script will compress both .js and .css files. The script picks up the type of file to be compressed from the  file's extension.  **YUI** will have to be changed to wherever the ''yuicompressor'' has been stored.
 ==== Usage: ==== ==== Usage: ====
-    any_compr.sh plugin_name.js.unc \\ if the script is in /usr/local/bin +    - ''any_compr.sh plugin_name.js.unc'' \\ if the script is in /usr/local/bin 
-    *./any_compr.sh plugin_name.js.unc\\ if the script is in the same directory as the file to be compressed. +    -''./any_compr.sh plugin_name.js.unc'' \\ if the script is in the same directory as the file to be compressed. 
-The result will be: plugin_name-cmpr.js or ((or css_file-cmpr.css, if you care compressing style sheet))+    - ''any_compr.sh plugin_name.js.unc file.js'' \\ an optional output file name can be added as a second option.  
 + 
 +The first two forms will produce a file named ''plugin_name-cmpr.js'' The third form will produce file named ''file.js''
plugin/ckgedit/compress.sh.1501178266.txt.gz · Last modified: 2017-07-27 19:57 by turnermm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki