Skip to content
Browse files

Build: pre-install compilers for robustness.

We need to be robust to this module getting installed by a parent that already
uses Streamline but not CoffeeScript. In that case, if we use the parent's
Streamline binary, it won't have CoffeeScript in its require() paths.

We work around that for now by forcing the local installation of CoffeeScript
and Streamline so that we know for certain the two will be siblings.

XXX This requires us to duplicate our semver spec for these dependencies.
TODO FIXME Revert this if npm changes to always install deps locally:

npm/npm#2443
  • Loading branch information...
1 parent 528d45c commit 4df4944eca079d9678aebcbf2ffb57c57bf2b17b @aseemk aseemk committed May 13, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 package.json
View
5 package.json
@@ -10,11 +10,13 @@
],
"main": "./lib",
"dependencies": {
- "coffee-script": "~1.3.1",
"http-status": "~0.1.0",
"request": "~2.1.1",
"streamline": "~0.3.4"
},
+ "devDependencies": {
+ "coffee-script": "~1.3.1"
+ },
"keywords": [
"neo4j",
"graph",
@@ -35,6 +37,7 @@
"scripts": {
"build": "_coffee -c lib/",
"clean": "rm lib/*.js",
+ "preinstall": "npm install coffee-script@~1.3.1 && npm install streamline@~0.3.4",
"postinstall": "npm run build",
"profile": "_coffee test/profile",
"test": "_coffee test"

0 comments on commit 4df4944

Please sign in to comment.
Something went wrong with that request. Please try again.