zoukankan      html  css  js  c++  java
  • [JavaScript] 配置JavaScript BUILD

    <project name="eForm" default="concatenate">
      <tstamp>
    <format property="build.time"
    pattern="MMM/dd/yyyy hh:mm:ss"
    locale="en,US"/>
    </tstamp>
    
    <property name="src.dir" location="C:SeamasProjectseFormsrc"/>
    <property name="build.dir" location="C:SeamasProjectseFormuild"/>
    <property name="lib.dir"  location="C:SeamasProjectsjs.build"/>
    
    <property name="yuicompressor"  location="C:SeamasProjectsjs.buildyuiyuicompressoryuicompressor-2.4.jar"/>
      
    
    <property name="jsdoc.dir"  location="C:SeamasProjectsjs.buildjsdoc"/>
    <property name="jsdoc"  location="${jsdoc.dir}jsrun.jar"/>
    <property name="jsdoc.run"  location="${jsdoc.dir}app
    un.js"/>
    <property name="jsdoc.templates"  location="${jsdoc.dir}	emplatesjsdoc"/>
    <property name="jsdoc.output"  location="${build.dir}docs"/>
    
    
    
    <loadfile property="license" srcfile="${src.dir}license.txt" />
    
      <target name="concatenate"> 
    <concat destfile="${build.dir}uild.js" fixlastline="yes" eol="lf">
      <header trimleading="yes">/*! 
    ${license}
    */
    /* build time: ${build.time} */</header>
            <fileset dir="${src.dir}" includes="*.js" />
        </concat>
      </target>
    
    
    
    
    <target name="minify">
    <apply executable="java" failonerror="true">
    <fileset dir="${build.dir}" includes="*.js"/>
    <mapper type="glob" from="*.js" to="${build.dir}/*-min.js"/>
    <arg line="-jar"/>
    <arg path="${yuicompressor}"/>
    
    <srcfile/>
    <arg line="-o"/>
    <targetfile/>
    </apply>
    </target>
    
    
    
    
    <target name="document">
    <apply executable="java" failonerror="true" parallel="true">
    <fileset dir="${src.dir}" includes="*.js" />
    <arg line="-jar"/>
    <arg path="${jsdoc}"/>
    <arg path="${jsdoc.run}" />
    <arg line="-t=${jsdoc.templates}" />
    <arg line="-d=${jsdoc.output}" />
    <srcfile/>
    </apply>
    </target>
    
    </project>

     这篇blog,仅仅是个人参考....后续会有继续的更新,这个是Version 1.0

    jslint and ANT

    references:

    http://505253293.blog.163.com/blog/static/268991672013183407272/

    http://www.myexception.cn/web/422928.html

    http://kaatz-media.com/2011/10/06/uberprufen-von-javascript-dateien-ant-und-jslint-jenkins-using-ant-on-jenkins-for-jslint/

    http://code.google.com/p/jslint4java/

    http://www.gototheboard.com/articles/Running_JSLint_With_Your_Ant_Build

    http://mattsnider.com/using-ant-to-consolidate-css-and-javascript/

  • 相关阅读:
    JavaScript 正则表达式上——基本语法
    温故知新 javascript 正则表达式
    Js把IE COM数组列表转换成数组
    Linux用户和用户组管理总结
    Linux FTP 服务器配置简单说明
    Linux中Samba详细安装
    js本地存储解决方案(localStorage与userData)
    通过了解渲染过程来提高页面性能
    使用Chrome DevTools的Timeline和Profiles提高Web应用程序的性能
    内存泄漏,循环引用
  • 原文地址:https://www.cnblogs.com/yang_sy/p/JavaScript_Ant_Build.html
Copyright © 2011-2022 走看看