So I have a package, widgetA. And another package, mainApp. These are entirely for local development and will never be published to npm.
widgetA contains Stylus, which needs to get compiled to CSS before mainApp sees it. At first I thought, oh, I'll use a "postinstall" script! But then I reflected on recent events and changed it to "prepublish". That should work great, right?
Then I went to actually carry out my workflow:
$ cd /path/to/projectRoot
$ cd widgetA
$ npm link
$ cd ../mainApp
$ npm link widgetA
$ npm install
Unfortunately, my "prepublish" script for widgetA was never run!
Even worse, when I changed to "postinstall", it was run!
So what's a locally-developing developer, who doesn't like antipatterns, to do?
Yes, this is a bug. link should run prepublish.
Workaround for now: cd /path/to/projectRoot/widgetA; npm install
cd /path/to/projectRoot/widgetA; npm install
@domenic npm link runs the prepublish script now, looks like this can be closed?