Permalink
Browse files

First attempt at making an NPM package

  • Loading branch information...
1 parent 7a7923c commit eac0eeed871d2b66496b3b210fe1c596b9f48b2c nzakas committed Feb 4, 2011
@@ -6,6 +6,7 @@ builddir=../../builder/componentbuild
#srcdir=./../../
component=yuitest-node
+
register.skip=true
component.mainclass = TestRunner
component.jsfiles.base = ./src
@@ -32,4 +33,4 @@ component.jsfiles= core/YUITest.js, \
commonjs/Exports.js
#Override
-global.build.base = ${component.jsfiles.base}/../build
+global.build.base = ${component.jsfiles.base}/../build
@@ -7,6 +7,7 @@
<property file="build-node.properties" />
<import file="${builddir}/2.x/bootstrap.xml" description="Default Build Properties and Targets" />
<target name="yuitest_build_subtask" depends="build, minify" />
+
</project>
@@ -35,3 +35,7 @@ component.jsfiles= core/YUITest.js, \
#Override
global.build.base = ${component.jsfiles.base}/../build
+
+#For NPM
+component.npm.base = ./npm
+global.build.npm = ${global.build.base}/${component}/npm
View
@@ -4,10 +4,21 @@
<property environment="env" />
- <target name="build" depends="YuiModuleTargets.build">
+ <target name="yuitest_build" depends="YuiModuleTargets.build">
<ant antfile="${buildfile.dir}/build-core.xml" target="yuitest_build_subtask" inheritAll="false" />
<ant antfile="${buildfile.dir}/build-node.xml" target="yuitest_build_subtask" inheritAll="false" />
</target>
+
+ <!-- override to make npm package -->
+ <target name="build" depends="yuitest_build">
+ <echo>Creating NPM package directory</echo>
+ <mkdir dir="${global.build.npm}"/>
+ <copy file="${component.npm.base}/package.json" tofile="${global.build.npm}/package.json"/>
+ <mkdir dir="${global.build.npm}/lib"/>
+ <copy file="${global.build.base}/yuitest/yuitest-node.js" tofile="${global.build.npm}/lib/yuitest-node.js"/>
+
+
+ </target>
<property file="build.properties" />
<import file="${builddir}/2.x/bootstrap.xml" description="Default Build Properties and Targets" />
Oops, something went wrong.

0 comments on commit eac0eee

Please sign in to comment.