Skip to content

Commit

Permalink
ant package-examples, package-lib don't clean dist/
Browse files Browse the repository at this point in the history
When hacking on SceneJS or an example it is helpful to
keep the generated documentation while regenerating
scenejs.js, scenejs.min.js and the examples.

The ant tasks: all, package, package-docs, docs clean
the dist directory.

The ant tasks package-examples, package-utils and package-lib
do not clean the dist directory.
  • Loading branch information
stepheneb committed Jan 31, 2011
1 parent 734b192 commit 14f7959
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ ant all
Create the "dist" directory, which will contain all the SceneJS libraries, JSDocs and examples.

If you are modifying the source code and testing it with a new example or your own project the following
ant tasks which complete in just a couple of seconds may be helpful.
ant tasks which complete in just a couple of seconds may be helpful. These tasks do not clean the dist
directory so previously-generated JSDocs will still available

ant package-lib

Expand Down
14 changes: 11 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<property name="SceneJS._JS_NAME" value="scenejs.js"/>
<property name="SceneJS._MIN_JS_NAME" value="scenejs.min.js"/>


<echo>************** Building SceneJS Version ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}.${PATCH_ID}</echo>

<property name="DIST_CONTAINER_DIR" location="${basedir}/dist"/>
Expand Down Expand Up @@ -162,6 +161,9 @@
<target name="all" depends="archive"/>

<target name="docs">
<property name="CLEAN_DIST" value="true"/>
<antcall target="create-dist-directories"/>

<taskdef name="jsdoctoolkit" classname="uk.co.darrenhurley.ant.tasks.JsDocToolkit">
<classpath>
<path refid="jsdoc.classpath"/>
Expand Down Expand Up @@ -299,7 +301,7 @@
<!--<target name="package" depends="assemble-lib, package-index, package-examples, package-docs">-->

<target name="package"
depends="package-lib, package-index, package-docs, package-examples, package-lib-utils, package-lib-plugins">
depends="package-lib, package-lib-utils, package-lib-plugins, package-index, package-examples, package-docs">
</target>

<target name="package-lib"
Expand Down Expand Up @@ -388,11 +390,17 @@
</copy>
</target>

<target name="create-dist-directories">

<target name="clean-dist-directory" if="CLEAN_DIST">
<mkdir dir="${DIST_CONTAINER_DIR}"></mkdir>
<delete includeemptydirs="true">
<fileset dir="${DIST_CONTAINER_DIR}" includes="**" defaultexcludes="false"/>
</delete>
</target>

<target name="create-dist-directories">
<mkdir dir="${DIST_CONTAINER_DIR}"></mkdir>
<antcall target="clean-dist-directory"/>
<mkdir dir="${EXTRACTED_DIST_DIR}"/>
<mkdir dir="${EXTRACTED_DIST_DIR}/lib"/>
<mkdir dir="${EXTRACTED_DIST_DIR}/lib/utils"/>
Expand Down

0 comments on commit 14f7959

Please sign in to comment.