From c308acdd71b492ae0f0bafb3c59472a25d13ef64 Mon Sep 17 00:00:00 2001 From: Manuel Simoni Date: Wed, 17 Oct 2012 15:38:39 +0200 Subject: [PATCH 1/2] Add ./bin/run-tests and update README with information about installing via npm. --- README.md | 25 ++++++++++++------------- bin/run-tests | 2 ++ 2 files changed, 14 insertions(+), 13 deletions(-) create mode 100755 bin/run-tests diff --git a/README.md b/README.md index e4ad8bf..0ff3fe8 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,7 @@ Inc](http://www.collective.com/). ### Prerequisites -#### Node.js 0.8.8 - -#### node-gyp build tool 0.6.10 +#### Node.js 0.8.8 and npm #### Modified Avro C++ library 1.7.2 @@ -33,24 +31,25 @@ changed to point to the location. ### Build ``` -node-gyp configure -node-gyp build +$ npm install ``` -This creates a directory called build/ containing the build outputs. -After changing the binding.gyp file it has been necessary to remove -the build/ directory. +This creates a directory called build/ containing the build outputs, +and node_modules/ containing required modules. After changing the +binding.gyp file it has been necessary to remove the build/ directory. ### Use -``` -export LD_LIBRARY_PATH=/usr/local/lib -``` - In JavaScript: ``` var avro = require("./build/Release/avro"); ``` -See test.js. +See test.js for examples. + +### Test + +``` +$ ./bin/run-tests +``` diff --git a/bin/run-tests b/bin/run-tests new file mode 100755 index 0000000..16d01a1 --- /dev/null +++ b/bin/run-tests @@ -0,0 +1,2 @@ +#!/bin/sh +./node_modules/mocha/bin/mocha test/*.js From c6f3927edba20b3f21f5ac69fa22cb94838f143f Mon Sep 17 00:00:00 2001 From: Manuel Simoni Date: Wed, 17 Oct 2012 15:50:54 +0200 Subject: [PATCH 2/2] Add ./bin/install-and-run-tests which runs npm install and all tests. --- bin/install-and-run-tests | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 bin/install-and-run-tests diff --git a/bin/install-and-run-tests b/bin/install-and-run-tests new file mode 100755 index 0000000..53456aa --- /dev/null +++ b/bin/install-and-run-tests @@ -0,0 +1,2 @@ +#!/bin/sh +npm install && ./bin/run-tests