iiscoldfusioncfexecutejsmin

CFExecute of jsmin fails


I am trying to minify some files in a roll-up script using jsmin. This works just fine on my local machine but when pushed to production it doesn't work at all. I am running the built-in CF development server locally and IIS on production. Not really sure how I should go about debugging this. Here is a relevant code snippet:

    <cfset LOCAL.args = '/c "C:\Inetpub\wwwroot\jsmin.exe < #LOCAL.jsfile#"'>
    <cfexecute name="c:\windows\system32\cmd.exe"
               arguments="#LOCAL.args#"
               timeout=10
               variable="LOCAL.jsmin">              
    </cfexecute>

Solution

  • I think the issue was with trying to run a 32-bit executable under a 64-bit OS, but I am not entirely sure. I couldn't get a good C compiler on my machine so I ended up getting the Java source for JSMin and running it using ColdFusion's JRE. That made it work.