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/

  • 相关阅读:
    npm 与 yarn 发展史
    关于oracle sql语句查询时表名和字段名要加双引号的问题
    Navicat工具mysql转库oracle步骤
    Linux根目录扩容方法及其涉及的相关磁盘操作
    Oracle中的数据类型详解
    一张图看懂钢铁生产工艺流程
    MYBATIS-PLUS关联查询,一对一、一对多
    直接替换Springboot jar包中的文件
    springboot配置数据库密码特殊字符报错问题
    教你一招,把 Win10 更新暂停到 N 年后的神奇方法
  • 原文地址:https://www.cnblogs.com/yang_sy/p/JavaScript_Ant_Build.html
Copyright © 2011-2022 走看看