Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Cliff Hall committed Mar 11, 2012
1 parent 756a571 commit bc54fbe
Show file tree
Hide file tree
Showing 15 changed files with 733 additions and 0 deletions.
129 changes: 129 additions & 0 deletions build/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- BUILD PUREMVC JS -->
<project name="puremvc.js" basedir="../" default="buildLib">

<!-- PROPERTIES -->
<property name="src.dir" value="${basedir}/src"/>
<property name="bin.dir" value="${basedir}/bin"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="report.dir" value="${basedir}/report"/>
<property name="template.dir" value="${build.dir}/template"/>
<property name="config.dir" value="${build.dir}/config"/>
<property name="lib.dir" value="${build.dir}/lib"/>
<property file="${config.dir}/build.properties" />
<property name="jscompjar" location="${lib.dir}/${google.closure.jar}" />
<property name="jstestjar" location="${lib.dir}/${js.test.driver.jar}" />
<property name="jsduckexe" location="${lib.dir}/${jsduck.win.executable}" />

<!-- TARGET: buildLib -->
<target name="buildLib" description="Package the PureMVC JS MultiCore library">

<!-- DEFINE COMPILER TASK -->
<taskdef classname="com.google.javascript.jscomp.ant.CompileTask"
name="jscomp" classpath="${jscompjar}"/>

<!-- CLEAN OUTPUT DIR -->
<delete>
<fileset dir="${bin.dir}" includes="*.js" />
</delete>

<!-- CONCATENATE SCRIPTS -->
<concat destfile="${bin.dir}/${library.name}.js" append="no"
encoding="UTF-8" outputencoding="UTF-8" fixlastline="true">
<path>
<pathelement location="${template.dir}/libraryTemplate.header.inc" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/observer/Observer.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/observer/Notification.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/observer/Notifier.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/command/SimpleCommand.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/command/MacroCommand.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/mediator/Mediator.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/proxy/Proxy.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/patterns/facade/Facade.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/core/View.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/core/Model.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/core/Controller.js" />
<pathelement location="${src.dir}/org/puremvc/js/multicore/help/oop.js" />
<pathelement location="${template.dir}/libraryTemplate.footer.inc" />
</path>
</concat>

<!-- MINIFY -->
<jscomp warning="${google.closure.warnlevel}" debug="false"
compilationLevel="${google.closure.complevel}"
output="${bin.dir}/${library.name}.min.js">

<sources dir="${bin.dir}">
<file name="${library.name}.js" />
</sources>

</jscomp>

</target>

<!-- TARGET: buildDocWindows -->
<target name="buildDocWindows" description="Build the documentation on Mac/Unix">
<exec executable="${lib.dir}/${jsduck.win.executable}" osfamily="windows">
<arg value="--config"/>
<arg value="${config.dir}/${jsduck.config}"/>
</exec>
</target>

<!-- TARGET: buildDocUnix -->
<target name="buildDocUnix" description="Build the documentation on Mac/Unix">
<exec executable="/bin/bash" dir="${build.dir}" osfamily="unix">
<arg value="${jsduck.shell.script}" />
</exec>
</target>

<!-- TARGET: runUnitTests -->
<target name="runUnitTests">

<!-- CREATE REPORT DIR -->
<mkdir dir="${report.dir}" />
<mkdir dir="${report.dir}/compressed" />
<mkdir dir="${report.dir}/uncompressed" />

<!-- RUN TESTS ON UNCOMPRESSED LIB -->
<java jar="${jstestjar}" dir="${lib.dir}" fork="true"
resultproperty="uncompressedUnitTestsPassed">

<arg value="--config" />
<arg value="${config.dir}/${js.test.driver.config.mini}" />

<arg value="--browser" />
<arg value="${js.test.browsers}" />

<arg value="--port" />
<arg value="${js.test.driver.port}" />

<arg value="--tests" />
<arg value="all" />

<arg value="--testOutput" />
<arg value="${report.dir}/uncompressed" />
</java>

<!-- RUN TESTS ON COMPRESSED LIB -->
<java jar="${jstestjar}" dir="${lib.dir}" fork="true"
resultproperty="compressedUnitTestsPassed">

<arg value="--config" />
<arg value="${config.dir}/${js.test.driver.config}" />

<arg value="--browser" />
<arg value="${js.test.browsers}" />

<arg value="--port" />
<arg value="${js.test.driver.port}" />

<arg value="--tests" />
<arg value="all" />

<arg value="--testOutput" />
<arg value="${report.dir}/compressed" />
</java>

</target>

</project>
25 changes: 25 additions & 0 deletions build/config/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# GOOGLE CLOSURE SETTINGS
# Simple compression compilation level
# (advanced level is not suitable for library compilation)
google.closure.jar=google-closure-compiler.jar
google.closure.complevel=simple
google.closure.warnlevel=quiet

# JS DUCK SETTINGS
jsduck.config=makeDocConf.json
jsduck.shell.script=./makeDoc.sh
jsduck.win.executable=jsduck-3.3.0.exe

# JS TEST DRIVER SETTINGS
js.test.driver.jar=JsTestDriver-1.3.3d.jar
js.test.driver.config=testdriver.conf
js.test.driver.config.mini=testdriver-compiled.conf
js.test.driver.port=2020
# WINDOWS: Uncomment the next line and supply comma separated paths to your available browsers
js.test.browsers="C:/Program Files/Mozilla Firefox/firefox.exe","C:/Program Files/Safari/safari.exe","C:/Documents and Settings/Administrator/Local Settings/Application Data/Google/Chrome/Application/chrome.exe","C:/Program Files/Internet Explorer/iexplore.exe"
# MAC OS: Uncomment the next line and supply comma separated paths to your your available browsers
#js.test.browsers=/Applications/Firefox.app/Contents/MacOS/firefox-bin
js.test.browsers=open
# PUREMVC SETTINGS
# The output library name
library.name=puremvc-1.0.1
8 changes: 8 additions & 0 deletions build/config/makeDocConf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"--title": "PureMVC JS Native MultiCore",
"--output": "../../docs",
"--":
[
"../../src"
]
}
39 changes: 39 additions & 0 deletions build/config/testdriver-compiled.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
server: http://localhost:2020

load:
- ../../bin/puremvc-1.0.1.min.js
- ../../test/CompiledTestHelp.js
- ../../test/ActorsExportedTest.js
- ../../test/org/puremvc/js/multicore/core/adapter/MediatorAdapter.js
- ../../test/org/puremvc/js/multicore/core/adapter/ProxyAdapter.js
- ../../test/org/puremvc/js/multicore/core/ViewTestConstants.js
- ../../test/org/puremvc/js/multicore/core/ViewTestNote.js
- ../../test/org/puremvc/js/multicore/core/ControllerTestVO.js
- ../../test/org/puremvc/js/multicore/core/ModelTestProxy.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator2.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator3.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator4.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator5.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator6.js
- ../../test/org/puremvc/js/multicore/core/ControllerTestCommand.js
- ../../test/org/puremvc/js/multicore/core/ControllerTestCommand2.js
- ../../test/org/puremvc/js/multicore/core/ControllerTest.js
- ../../test/org/puremvc/js/multicore/core/ModelTest.js
- ../../test/org/puremvc/js/multicore/core/ViewTest.js
- ../../test/org/puremvc/js/multicore/patterns/proxy/ProxyTest.js
- ../../test/org/puremvc/js/multicore/patterns/observer/NotificationTest.js
- ../../test/org/puremvc/js/multicore/patterns/observer/ObserverTest.js
- ../../test/org/puremvc/js/multicore/patterns/mediator/MediatorTest.js
- ../../test/org/puremvc/js/multicore/patterns/facade/FacadeTestCommand.js
- ../../test/org/puremvc/js/multicore/patterns/facade/FacadeTestVO.js
- ../../test/org/puremvc/js/multicore/patterns/facade/FacadeTest.js
- ../../test/org/puremvc/js/multicore/patterns/command/SimpleCommandTestVO.js
- ../../test/org/puremvc/js/multicore/patterns/command/SimpleCommandTestCommand.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestSub1Command.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestSub2Command.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestVO.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestCommand.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTest.js
- ../../src/org/puremvc/js/multicore/help/oop.js
- ../../test/org/puremvc/js/multicore/help/OopTest.js
50 changes: 50 additions & 0 deletions build/config/testdriver.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
server: http://localhost:2020

load:
- ../../src/org/puremvc/js/multicore/patterns/observer/Notification.js
- ../../src/org/puremvc/js/multicore/patterns/observer/Observer.js
- ../../src/org/puremvc/js/multicore/patterns/observer/Notifier.js
- ../../src/org/puremvc/js/multicore/patterns/command/SimpleCommand.js
- ../../src/org/puremvc/js/multicore/patterns/command/MacroCommand.js
- ../../src/org/puremvc/js/multicore/patterns/proxy/Proxy.js
- ../../src/org/puremvc/js/multicore/patterns/mediator/Mediator.js
- ../../src/org/puremvc/js/multicore/patterns/facade/Facade.js
- ../../src/org/puremvc/js/multicore/core/Controller.js
- ../../src/org/puremvc/js/multicore/core/Model.js
- ../../src/org/puremvc/js/multicore/core/View.js
- ../../src/org/puremvc/js/multicore/help/oop.js
- ../../test/org/puremvc/js/multicore/core/adapter/MediatorAdapter.js
- ../../test/org/puremvc/js/multicore/core/adapter/ProxyAdapter.js
- ../../test/org/puremvc/js/multicore/core/ViewTestConstants.js
- ../../test/org/puremvc/js/multicore/core/ViewTestNote.js
- ../../test/org/puremvc/js/multicore/core/ControllerTestVO.js
- ../../test/org/puremvc/js/multicore/core/ModelTestProxy.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator2.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator3.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator4.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator5.js
- ../../test/org/puremvc/js/multicore/core/ViewTestMediator6.js
- ../../test/org/puremvc/js/multicore/core/ControllerTestCommand.js
- ../../test/org/puremvc/js/multicore/core/ControllerTestCommand2.js
- ../../test/org/puremvc/js/multicore/core/ControllerTest.js
- ../../test/org/puremvc/js/multicore/core/ModelTest.js
- ../../test/org/puremvc/js/multicore/core/ViewTest.js
- ../../test/org/puremvc/js/multicore/patterns/proxy/ProxyTest.js
- ../../test/org/puremvc/js/multicore/patterns/observer/NotificationTest.js
- ../../test/org/puremvc/js/multicore/patterns/observer/ObserverTest.js
- ../../test/org/puremvc/js/multicore/patterns/mediator/MediatorTest.js
- ../../test/org/puremvc/js/multicore/patterns/facade/FacadeTestCommand.js
- ../../test/org/puremvc/js/multicore/patterns/facade/FacadeTestVO.js
- ../../test/org/puremvc/js/multicore/patterns/facade/FacadeTest.js
- ../../test/org/puremvc/js/multicore/patterns/command/SimpleCommandTestVO.js
- ../../test/org/puremvc/js/multicore/patterns/command/SimpleCommandTestCommand.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestSub1Command.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestSub2Command.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestVO.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTestCommand.js
- ../../test/org/puremvc/js/multicore/patterns/command/MacroCommandTest.js
- ../../test/org/puremvc/js/multicore/help/OopTest.js



Binary file added build/lib/JsTestDriver-1.3.3d.jar
Binary file not shown.
Binary file added build/lib/google-closure-compiler.jar
Binary file not shown.
Binary file added build/lib/jsduck-3.3.0.exe
Binary file not shown.
Loading

0 comments on commit bc54fbe

Please sign in to comment.