js压缩

del tempdir.txt
del eip.txt
del ../../sword/EipCompressUrl.js
del ../../sword/framework/EipLib-debug.js
del ../../sword/framework/EipLib.js

dir ../../sword/controllibrary/wfs/*.js /a-d/b/s >>tempdir.txt
dir ../../sword/controllibrary/eip/*.js /a-d/b/s >>tempdir.txt
dir ../../sword/controllibrary/cms/*.js /a-d/b/s >>tempdir.txt
dir ../../sword/controllibrary/employeePlanning/*.js /a-d/b/s >>tempdir.txt


setlocal EnableDelayedExpansion
echo
set sub=,
set yinhao="

echo sword.framework.scriptManager.addLoadedFiles([ >>../../sword/EipCompressUrl.js

for /f %%i in (tempdir.txt) do (
set line=%%i
set line=!line:/=/!
set line=!line:~50!
set line=%yinhao%!line!
set line=!line!%yinhao%
set line=!line!%sub%
echo !line!>>../../sword/EipCompressUrl.js
)
echo "/sword/EipCompressUrl.js"]);>>../../sword/EipCompressUrl.js

set maohao=../..
for /f %%i in (tempdir.txt) do (
set eipline=%%i
set eipline=!eipline:~50!
set eipline=%maohao%!eipline!
echo !eipline!>>eip.txt
)
echo ../../sword/EipCompressUrl.js>>eip.txt


for /f %%i in (eip.txt) do (
type %%i >> ../../sword/framework/EipLib-debug.js
echo ;>>../../sword/framework/EipLib-debug.js

java -jar ../yuicompressor-2.4.2.jar --type js --nomunge --preserve-semi --charset utf-8 -o ../../sword/framework/EipLib.js ../../sword/framework/EipLib-debug.js

endlocal

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值