ESC之ESC.wsf可以實現(xiàn)javascript的代碼壓縮附使用方法第4/5頁
更新時間:2007年05月07日 00:00:00 作者:
可以對javascript的大小進行壓縮。使javascript的加載速度變快。
Examples of usage
X:\cscript ESC.wsf -ow crunched.js original1.js original2.js original3.js Crunch 'original1.js','original2.js' and 'original3.js' at level 2 (default) and save the output as 'crunched.js'. Any previous file named 'crunched.js' will be overwritten.
X:\cscript ESC.wsf -l 1 -oa crunched.js C:\script-directory Grab all scriptfiles (.js) in directory 'C:\script-directory', crunch them at level 1 (comment and empty line removal only) and append the result to 'crunched.js'. If 'crunched.js' doesn't exist, it will be created.
X:\cscript ESC.wsf -l 0 -$ -ow STDOUT original1.js original2.js Subject 'original1.js' and 'original2.js' for variable substitution, but perform no comment or whitespace removal. Redirect output to STDOUT instead of writing to file.
X:\cscript ESC.wsf -l 4 -ow crunched.js original.js Crunch 'original.js' using variable substitution and remove any occurance of whitespace (where permitted...) and save it as 'crunched.js' (equals -l 3 -$)
X:\cscript ESC.wsf -l 4 -ow crunched.js original.js > verbose.txt Crunch 'original.js' at level 4 and save the verbose output to verbose.txt
相關(guān)文章
原生javascript實現(xiàn)解析XML文檔與字符串
這篇文章主要介紹了javascript解析XML文檔和XML字符串的方法和具體的代碼解析,有需要的小伙伴可以參考下。2016-03-03
分享兩個手機訪問pc網(wǎng)站自動跳轉(zhuǎn)手機端網(wǎng)站代碼
這篇文章主要介紹了分享兩個手機訪問pc網(wǎng)站自動跳轉(zhuǎn)手機端網(wǎng)站代碼,需要的朋友可以參考下2015-01-01
PhantomJS快速入門教程(服務(wù)器端的 JavaScript API 的 WebKit)
Phantom JS是一個服務(wù)器端的 JavaScript API 的 WebKit。其支持各種Web標(biāo)準(zhǔn): DOM 處理, CSS 選擇器, JSON, Canvas, 和 SVG2015-08-08

