今天研究了一下YUI yahoo开源框架,感觉很猛啊。
于是乎我做了一个YUI的ant实现,网上好多关于bat的实现,我就另辟蹊径,出个关于这个的ant实现,嘿嘿独一无二的文章,如果转载的话,其注明作者和网站
copyright:Mr.chen
好了具体操作如下:
官网:
具体的相关代码如下:
js work dir
commonJs.dir = js
build temp dir
output.temp.dir = build
output files in the directory
output.dir = ${output.temp.dir}_output
environment needs lib
liblib = lib
<?xml version="1.0" encoding="UTF-8"?>
<project name="Compress css-JS" default="compress" basedir=".">
<path id="yuiClasspath">
<fileset dir="${lib}">
<target name="init">
<target name="combinecss" depends="init" description="Combine common css files">
<target name="combinejs">
<target name="compress" depends="combinecss,combinejs" description="Compress">
@echo off
echo ################################################
echo ##########Tool Compress the js and css##########
echo ################################################
echo Please make sure your css and js in the css'directory and js'directory.
echo If sure,please enter any button to continue the tool.
pause
call ant -buildfile compress.xml compress>build.log
echo compress end
pause @H_403_67@
相关的文件我提供下载,感觉好的,就留言吧
原文链接:https://www.f2er.com/php/23863.html