Skip to content

Instantly share code, notes, and snippets.

@behrad
Created January 28, 2014 08:46
Show Gist options
  • Save behrad/8664191 to your computer and use it in GitHub Desktop.
Save behrad/8664191 to your computer and use it in GitHub Desktop.
Npm Dependencies
​#!/bin/sh
for i in $(find ./local_modules -type d -maxdepth 1) ; do
packageJson="${i}/package.json"
if [ -f "${packageJso​​n}" ]; then
echo "installing ${i}..."
npm install "${i}"
fi
done
cd moduleA/
npm link
cd ../moduleB
# npm install fails!!!
npm link moduleA
npm install
"scripts": {
"postinstall": "npm link /lib/; npm link ../shared/;",
"postupdate": "npm link ./lib/; npm link ../shared/;"
}
https://github.com/isaacs/npm/issues/1558
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment