今天研究了一下YUI yahoo开源框架,感觉很猛啊。
于是乎我做了一个YUI的ant实现,网上好多关于bat的实现,我就另辟蹊径,出个关于这个的ant实现,嘿嘿独一无二的文章,如果转载的话,其注明作者和网站
copyright:Mr.chen
好了具体操作如下:
官网:
yuicompressor-2.4.6.jar 下载地址 http://yuilibrary.com/downloads/#yuicompressor
YUIAnt.jar 下载地址 http://www.ubik-ingenierie.com/miscellanous/YUIAnt/
具体的相关代码如下:
#css work dir commonCss.dir = css #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="."> <property file="bulid.properties" /> <path id="yuiClasspath"> <fileset dir="${lib}"> <include name="*.*" /> </fileset> </path> <!-- #######################Init the environment of the tool ##########################--> <target name="init"> <echo message="begin to init the init" /> <echo message="delete all reference files." /> <delete dir="${output.dir}" /> <echo message="delete end" /> <echo message="make the reference files." /> <mkdir dir="${output.dir}" /> <mkdir dir="${output.temp.dir}" /> <echo message="make end." /> </target> <!-- #######################Combine the css files ##########################--> <target name="combinecss" depends="init" description="Combine common css files"> <echo message="begin to combine the css files to one file." /> <concat destfile="${output.temp.dir}/combined_css.css" encoding="UTF-8" append="false"> <fileset dir="${commonCss.dir}"> <include name="*.css" /> </fileset> </concat> <echo message="combine end." /> </target> <!-- #######################Combine the js files ##########################--> <target name="combinejs"> <echo message="begin to combine the js files to one file." /> <concat destfile="${output.temp.dir}/all_source.js" encoding="utf-8" append="false"> <fileset dir="${commonJs.dir}"> <include name="*.js" /> </fileset> </concat> <echo message="combine end." /> </target> <!-- #######################Compress the js and css files ##########################--> <target name="compress" depends="combinecss,combinejs" description="Compress"> <echo message="begin to compress the css file." /> <taskdef name="yuicompress" classname="com.yahoo.platform.yui.compressor.YUICompressTask"> <classpath> <path refid="yuiClasspath" /> </classpath> </taskdef> <!-- first method compress the css files --> <yuicompress linebreak="10000000" warn="false" munge="yes" preserveallsemicolons="true" outputfolder="${output.dir}"> <fileset dir="${output.temp.dir}"> <include name="*.css" /> </fileset> </yuicompress> <echo message ="compress the css end." /> <!-- second method compress the js files--> <echo message ="begin to compress the js file." /> <apply executable="java" parallel="false" failonerror="true"> <fileset dir="${output.temp.dir}" includes="all_source.js" /> <arg line="-jar" /> <arg path="${lib}/yuicompressor-2.4.6.jar" /> <arg line="--charset utf-8" /> <arg line="-o ${output.dir}/combined_js.js" /> <srcfile /> </apply> <echo message ="compress the js end." /> <delete dir="${output.temp.dir}" /> </target> </project> @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
相关的文件我提供下载,感觉好的,就留言吧

在css中,可用list-style-type属性来去掉ul的圆点标记,语法为“ul{list-style-type:none}”;list-style-type属性可设置列表项标记的类型,当值为“none”可不定义标记,也可去除已有标记。

ANT+技术有助于轻松将智能教练机与PC配对。它以无缝连接而闻名,因为PC可以监控、分析和存储来自健身和健康传感器的数据。但是,只有在您的PC上安装了ANT+驱动程序时,才能进行此连接。在用户开始升级到Windows11之前,这个过程过去很容易。现在,用户抱怨由于驱动程序丢失和损坏而导致配对失败,以及其他抱怨。由于大多数大玩家都没有提出解决方案,一些用户被迫降级回Windows10。本教程将引导您了解如何在Windows11上安装ANT+驱动程序,而无需降级您的PC

区别是:css是层叠样式表单,是将样式信息与网页内容分离的一种标记语言,主要用来设计网页的样式,还可以对网页各元素进行格式化;xml是可扩展标记语言,是一种数据存储语言,用于使用简单的标记描述数据,将文档分成许多部件并对这些部件加以标识。

在css中,可以利用cursor属性实现鼠标隐藏效果,该属性用于定义鼠标指针放在一个元素边界范围内时所用的光标形状,当属性值设置为none时,就可以实现鼠标隐藏效果,语法为“元素{cursor:none}”。

ANT是天线接口,用来连接天线;常见于收音机或者GPS等上面;在接收短波或FM时需要外界天线,以增加接收灵敏度;天线接口是无线设备的一个接口端,无线设备本身的天线都有一定距离的限制,当超出这个限制的距离,就要通过这些外接天线来增强无线信号,达到延伸传输距离的目的。

转换方法:1、给英文元素添加“text-transform: uppercase;”样式,可将所有的英文字母都变成大写;2、给英文元素添加“text-transform:capitalize;”样式,可将英文文本中每个单词的首字母变为大写。

在css中,rtl是“right-to-left”的缩写,是从右往左的意思,指的是内联内容从右往左依次排布,是direction属性的一个属性值;该属性规定了文本的方向和书写方向,语法为“元素{direction:rtl}”。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中

Atom编辑器mac版下载
最流行的的开源编辑器

Dreamweaver Mac版
视觉化网页开发工具

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。