forked from yeungda/jcoffeescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created a jar that compiles CoffeeScript using mozilla rhino for coff…
…eescript 0.6.1.
- Loading branch information
Showing
25 changed files
with
346 additions
and
117 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ Copyright 2010 David Yeung | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<project name="JCoffeeScript" default="build"> | ||
|
||
<target name="build" depends="bootstrap, clean, functional-test"/> | ||
|
||
<property name="artifact.name" value="jcoffeescript-0.1"/> | ||
<import file="${basedir}/conf/build/build-bootstrap.xml"/> | ||
<import file="${basedir}/conf/build/build-clean.xml"/> | ||
<import file="${basedir}/conf/build/build-compile.xml"/> | ||
<import file="${basedir}/conf/build/build-test.xml"/> | ||
<import file="${basedir}/conf/build/build-jar.xml"/> | ||
|
||
<target name="dependencies"> | ||
<path id="compile.classpath"> | ||
<fileset dir="${basedir}/lib"> | ||
<include name="js.jar"/> | ||
</fileset> | ||
</path> | ||
<path id="test.classpath"> | ||
<path refid="compile.classpath"/> | ||
<fileset dir="${basedir}/lib"> | ||
<include name="hamcrest-all-1.3RC0.jar"/> | ||
<include name="junit-dep-4.8.2.jar"/> | ||
</fileset> | ||
</path> | ||
</target> | ||
|
||
<target name="functional-test" depends="jar"> | ||
<java inputstring="a:1" jar="${basedir}/target/dist/${artifact.name}.jar" failonerror="true" fork="true"/> | ||
</target> | ||
</project> |
Submodule coffee-script
deleted from
1cddb2
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<project> | ||
|
||
<target name="bootstrap"> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${basedir}/conf/build/bootstrap/ant-contrib-1.0b3.jar"/> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project> | ||
|
||
<target name="clean" description="cleans target folder"> | ||
<delete dir="${basedir}/target" includeEmptyDirs="true" failonerror="true" /> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project> | ||
|
||
<taskdef resource="net/sf/antcontrib/antlib.xml"/> | ||
|
||
<target name="dependencies"> | ||
<fail message="[dependencies] target should be defined outside the scope of build-compile"/> | ||
</target> | ||
|
||
<target name="compile" depends="dependencies, compile-all" description="compile all source folders"/> | ||
|
||
<target name="compile-all"> | ||
<compile-folder folder="main" classpathref="compile.classpath"/> | ||
<compile-folder folder="standalone" classpathref="test.classpath"/> | ||
<compile-folder folder="unit-tests" classpathref="test.classpath"/> | ||
<compile-folder folder="integration-tests" classpathref="test.classpath"/> | ||
</target> | ||
|
||
<macrodef name="compile-folder"> | ||
<attribute name="folder" /> | ||
<attribute name="classpathref" /> | ||
<sequential> | ||
<if> | ||
<available file="${basedir}/src/@{folder}/java" type="dir"/> | ||
<then> | ||
<mkdir dir="${basedir}/target/classes/@{folder}"/> | ||
<javac srcdir="${basedir}/src/@{folder}/java" destdir="${basedir}/target/classes/@{folder}" source="1.5" target="1.5" debug="true"> | ||
<classpath> | ||
<path refid="@{classpathref}"/> | ||
<pathelement location="${basedir}/target/classes/main" /> | ||
</classpath> | ||
</javac> | ||
<copy todir="${basedir}/target/classes/@{folder}"> | ||
<fileset dir="${basedir}/src/@{folder}/java" excludes="**/*.java"/> | ||
</copy> | ||
</then> | ||
</if> | ||
<if> | ||
<available file="${basedir}/src/@{folder}/resources" type="dir"/> | ||
<then> | ||
<mkdir dir="${basedir}/target/classes/@{folder}" /> | ||
<copy todir="${basedir}/target/classes/@{folder}"> | ||
<fileset dir="${basedir}/src/@{folder}/resources" /> | ||
</copy> | ||
</then> | ||
</if> | ||
</sequential> | ||
</macrodef> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project> | ||
<target name="jar" depends="test"> | ||
<mkdir dir="${basedir}/target/dist"/> | ||
<pathtofileset name="jars" pathrefid="compile.classpath" dir="${basedir}/lib"/> | ||
|
||
<jar destfile="${basedir}/target/dist/${artifact.name}.jar"> | ||
<manifest><attribute name="Main-Class" value="org.jcoffeescript.Main"/></manifest> | ||
<zipgroupfileset refid="jars"/> | ||
<metainf dir="${basedir}/.." includes="LICENSE,NOTICE"/> | ||
<zipfileset dir="${basedir}/target/classes/main"/> | ||
</jar> | ||
</target> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project> | ||
|
||
<target name="compile"> | ||
<fail message="[compile] target should be defined outside the scope of build-test"/> | ||
</target> | ||
|
||
<target name="test" depends="compile"> | ||
<sequential> | ||
<run-test folder="unit-tests" /> | ||
<run-test folder="integration-tests" /> | ||
<fail if="tests-failed" message="tests failed" /> | ||
</sequential> | ||
</target> | ||
|
||
<macrodef name="run-test"> | ||
<attribute name="folder" /> | ||
<sequential> | ||
<if> | ||
<available file="${basedir}/src/@{folder}/java" type="dir"/> | ||
<then> | ||
<delete dir="${basedir}/target/test-reports/@{folder}" includeEmptyDirs="true" failonerror="true" /> | ||
<mkdir dir="${basedir}/target/test-reports/@{folder}" /> | ||
<mkdir dir="${basedir}/target/test-reports/@{folder}/xml" /> | ||
<mkdir dir="${basedir}/target/test-reports/@{folder}/html" /> | ||
<junit printsummary="yes" fork="yes" forkmode="once" failureproperty="tests-failed"> | ||
<classpath> | ||
<path refid="test.classpath" /> | ||
<pathelement location="${basedir}/target/classes/main" /> | ||
<pathelement location="${basedir}/target/classes/@{folder}" /> | ||
</classpath> | ||
<formatter type="xml" /> | ||
<batchtest fork="yes" todir="${basedir}/target/test-reports/@{folder}/xml"> | ||
<fileset dir="${basedir}/target/classes/@{folder}" includes="**/*Test.class" /> | ||
</batchtest> | ||
</junit> | ||
<junitreport todir="${basedir}/target/test-reports/@{folder}/html"> | ||
<fileset dir="${basedir}/target/test-reports/@{folder}/xml"> | ||
<include name="TEST-*.xml"/> | ||
</fileset> | ||
<report format="frames" todir="${basedir}/target/test-reports/@{folder}/html"/> | ||
</junitreport> | ||
</then> | ||
</if> | ||
</sequential> | ||
</macrodef> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Submodule narwhal
deleted from
e88dd6
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.