4 Detect if we were run as a result of `npm publish`. This is intended to allow you to
5 easily have prepublish lifecycle scripts that don't run when you run `npm install`.
8 $ npm install --save in-publish
9 in-publish@1.0.0 node_modules/in-publish
12 Then edit your package.json to have:
16 "prepublish": "in-publish && thing-I-dont-want-on-dev-install || not-in-publish"
25 Then `thing-I-dont-want-on-dev-install` won't be run, but...
30 And `thing-I-dont-want-on-dev-install` will be run.
32 It's worth noting that the `prepublish` lifecycle is _ALSO_ called when you build a tarball, so:
38 Will call your `prepublish` lifecycle, but with the examplea above,
39 `thing-I-dont-want-on-dev-install` won't be run.
41 If you want this, you can use another helper included here:
45 "prepublish": "not-in-install && thing-I-dont-want-on-dev-install || in-install"
49 The above will run your `thing-I-dont-want-on-dev-install` on `publish` and
50 on `pack` but not on `install`.