Windows Batch File to use YUI Compressor easily
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
if "%1" == "" goto error | |
setlocal | |
set jarfile="C:\Program Files\yuicompressor-2.4.2\build\yuicompressor-2.4.2.jar" | |
set infile=%1 | |
set ext=%~x1 | |
if %ext% == .css set outfile=%infile:.css=.min.css% | |
if %ext% == .js set outfile=%infile:.js=.min.js% | |
java -jar %jarfile% -v --charset UTF-8 -o %outfile% %infile% | |
endlocal | |
goto end | |
:error | |
echo No Argument | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment