Skip to content

Instantly share code, notes, and snippets.

@joeytrapp
Created September 19, 2014 20:42
Show Gist options
  • Save joeytrapp/794c4fd23007e4770675 to your computer and use it in GitHub Desktop.
Save joeytrapp/794c4fd23007e4770675 to your computer and use it in GitHub Desktop.
Load and link local modules in vendor/ as items in node_modules/
{
"name": "name",
"version": "0.0.1",
"description": "desc",
"main": "index.js",
"scripts": {
"test": "make test",
"preinstall": "find vendor -type d -maxdepth 1 | tail -n 2 | cut -c8- | xargs -L 1 -I {} rm -f node_modules/{}",
"postinstall": "find vendor -type d -maxdepth 1 | tail -n 2 | cut -c8- | xargs -L 1 -I {} sh -c 'ln -s \"$(pwd)/vendor/{}\" node_modules/{}; cd vendor/{} && npm install'"
},
"author": "",
"license": "MIT",
"devDependencies": {
"chai": "~1.8.1",
"mocha": "~1.15.1"
},
"dependencies": {
"express": "~3.4.7"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment