When using npm to install wire as a dependency of another project, the post install script executes and causes all sorts of fun. I assume this is only intended to run for developer working on wire and not consumers of wire.
On dev, right? Any suggestions on how to automagically/easily install wire's own deps for development, and also prevent this chaos when installing wire as a dep of another project?
yep, on dev. At one point I thought there was a postdevinstall, but I don't see it now... Perhaps invoke a proper script that sniffs the env before proceeding
Yeah. Another option might be to have an npm script install-devdeps or something that people can run manually when setting up their dev env.
There are a ton of env vars npm adds when exec'ing the script, I'm sure there's something we can sniff
The envvars are not helpful. The best sniff I can come up with is to check if the working dir is under node_modules
Bummer. Stinks that there's no easy way to do this, postdevinstall sounds like it would have been perfect.
Hmmm, looking at the npm script docs, I wonder if prepublish would work. It says it will be run when doing npm install with no args. We'd have to filter the submodule and bower install dirs using .npmignore, but sounds like it may work. I'll give it a go today.
Potential fix for #99 using npm prepublish. Switch to bower.json, add…
Ok, prepublish seems to do what we want, but def will be good for someone else to try! Here's what I've observed:
npm install <path to npm packed wire tgz>
Seems like it works, but def need someone else to verify!
I can confirm the prepublish script is not exec'ed when installing as a dependency.
Cool, thanks, I'll merge this back into dev.
Fixed by bb4bb89