THRIFT-2940 nodejs: move package.json to root folder

fix make dist & co
diff --git a/.gitignore b/.gitignore
index 65bb2ec..228c6ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -217,6 +217,7 @@
 /libtool
 /ltmain.sh
 /missing
+/node_modules/
 /stamp-h1
 /test/status.html
 /test/c_glib/test_client
diff --git a/Makefile.am b/Makefile.am
index 6835fe4..0a9e431 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -78,6 +78,7 @@
 	debian \
 	doc \
 	doap.rdf \
+	package.json \
 	sonar-project.properties \
 	LICENSE \
 	CHANGES \
diff --git a/lib/nodejs/Makefile.am b/lib/nodejs/Makefile.am
index 3868905..9998348 100755
--- a/lib/nodejs/Makefile.am
+++ b/lib/nodejs/Makefile.am
@@ -21,18 +21,18 @@
 #stubs: $(top_srcdir)/test/ThriftTest.thrift
 #	$(THRIFT) --gen js:node -o test/ $(top_srcdir)/test/ThriftTest.thrift
 
-deps: package.json
-	$(NPM) install --no-bin-links
+deps: $(top_srcdir)/package.json
+	$(NPM) install --no-bin-links $(top_srcdir)/
 
 check: deps
-	$(NPM) test
+	cd $(top_srcdir) && $(NPM) test && cd lib/nodejs
 
 clean-local:
 	$(RM) -r test/gen-nodejs
+	$(RM) -r $(top_srcdir)/node_modules
 
 EXTRA_DIST = \
 	examples \
 	lib \
-	package.json \
 	test \
 	README.md