Updates build process.
This commit is contained in:
parent
ba3e61c1d0
commit
ba12154566
4 changed files with 58 additions and 69 deletions
|
@ -16,8 +16,6 @@ release.dir = release
|
|||
|
||||
|
||||
# tools
|
||||
tool.wepp = tools/wepp
|
||||
tool.wepp = wepp
|
||||
tool.jslint = jslint
|
||||
tool.jshint = jshint
|
||||
tool.jsxint.file = ${build.dir}/_h5ai/js/main-js.js
|
||||
|
||||
|
|
79
build.xml
79
build.xml
|
@ -5,8 +5,6 @@
|
|||
default="release"
|
||||
>
|
||||
|
||||
<import file="tools/wepp.ant.xml" />
|
||||
|
||||
<target name="init">
|
||||
<property file="build.properties" />
|
||||
<tstamp>
|
||||
|
@ -37,13 +35,13 @@
|
|||
</target>
|
||||
|
||||
<target name="build" depends="build-prepare">
|
||||
<wepp.dir dir="${build.dir}/_h5ai/css" />
|
||||
<wepp.dir dir="${build.dir}/_h5ai/js" />
|
||||
<wepp-dir-min dir="${build.dir}/_h5ai/css" todir="${build.dir}/_h5ai/css" />
|
||||
<wepp-dir-min dir="${build.dir}/_h5ai/js" todir="${build.dir}/_h5ai/js" />
|
||||
</target>
|
||||
|
||||
<target name="build-uncompressed" depends="build-prepare">
|
||||
<wepp.dir dir="${build.dir}/_h5ai/css" args="--nc" />
|
||||
<wepp.dir dir="${build.dir}/_h5ai/js" args="--nc" />
|
||||
<wepp-dir dir="${build.dir}/_h5ai/css" todir="${build.dir}/_h5ai/css" />
|
||||
<wepp-dir dir="${build.dir}/_h5ai/js" todir="${build.dir}/_h5ai/js" />
|
||||
</target>
|
||||
|
||||
<target name="release" depends="build">
|
||||
|
@ -51,25 +49,62 @@
|
|||
<zip destfile="${release.dir}/${project.name}-${project.version}.zip" basedir="${build.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="pre-xint" depends="build-prepare">
|
||||
<wepp file="${tool.jsxint.file}" tofile="${tool.jsxint.file}" args="--nc" />
|
||||
<target name="lint" depends="build-prepare">
|
||||
<wepp file="${build.dir}/_h5ai/js/main-js.js" tofile="${build.dir}/_h5ai/js/main-js.js" />
|
||||
<jslint files="${build.dir}/_h5ai/js/main-js.js" />
|
||||
</target>
|
||||
|
||||
<target name="lint" depends="pre-xint">
|
||||
<echo>JSLint "${tool.jsxint.file}"</echo>
|
||||
<exec executable="${tool.jslint}" failonerror="true">
|
||||
<arg value="${tool.jsxint.file}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="hint" depends="pre-xint">
|
||||
<echo>JSHint "${tool.jsxint.file}"</echo>
|
||||
<exec executable="${tool.jshint}" failonerror="true">
|
||||
<arg value="${tool.jsxint.file}" />
|
||||
</exec>
|
||||
</target>
|
||||
<macrodef name="wepp-args">
|
||||
<attribute name="args" default="" />
|
||||
<sequential>
|
||||
<exec executable="${tool.wepp}" failonerror="true">
|
||||
<arg line="@{args}" />
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="xint" depends="lint,hint">
|
||||
</target>
|
||||
<macrodef name="wepp">
|
||||
<attribute name="file" />
|
||||
<attribute name="tofile" />
|
||||
<sequential>
|
||||
<wepp-args args="--nc --inFile '@{file}' --outFile '@{toFile}'" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="wepp-min">
|
||||
<attribute name="file" />
|
||||
<attribute name="tofile" />
|
||||
<sequential>
|
||||
<wepp-args args="--inFile '@{file}' --outFile '@{toFile}'" />
|
||||
<bytes file="@{file}" toFile="@{toFile}" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="wepp-dir">
|
||||
<attribute name="dir" />
|
||||
<attribute name="todir" />
|
||||
<sequential>
|
||||
<wepp-args args="--nc --inDir '@{dir}' --outDir '@{todir}'" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="wepp-dir-min">
|
||||
<attribute name="dir" />
|
||||
<attribute name="todir" />
|
||||
<sequential>
|
||||
<wepp-args args="--inDir '@{dir}' --outDir '@{todir}'" />
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="jslint">
|
||||
<attribute name="files" />
|
||||
<sequential>
|
||||
<echo>JSLint @{files}</echo>
|
||||
<exec executable="${tool.jslint}" failonerror="false">
|
||||
<arg line="@{files}" />
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#! /usr/bin/env node
|
||||
// -*- js -*-
|
||||
|
||||
require("wepp").processArgs(process.argv);
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project name="wepp.macros" basedir=".">
|
||||
|
||||
<macrodef name="wepp">
|
||||
<attribute name="file" />
|
||||
<attribute name="toFile" />
|
||||
<attribute name="args" default="" />
|
||||
<sequential>
|
||||
<exec executable="${tool.wepp}">
|
||||
<arg line="@{args}" />
|
||||
<arg value="--in" />
|
||||
<arg value="@{file}" />
|
||||
<arg value="--out" />
|
||||
<arg value="@{toFile}" />
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<macrodef name="wepp.dir">
|
||||
<attribute name="dir" />
|
||||
<attribute name="args" default="" />
|
||||
<sequential>
|
||||
<exec executable="${tool.wepp}">
|
||||
<arg line="@{args}" />
|
||||
<arg value="--inDir" />
|
||||
<arg value="@{dir}" />
|
||||
<arg value="--outDir" />
|
||||
<arg value="@{dir}" />
|
||||
</exec>
|
||||
<delete dir="@{dir}/inc">
|
||||
<fileset
|
||||
dir="."
|
||||
includes="@{dir}/**/*.less"
|
||||
excludes="@{dir}/inc/**,@{dir}/lib/**"
|
||||
/>
|
||||
</delete>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
</project>
|
Loading…
Add table
Reference in a new issue