Should typings be committed? If no, how to trigger typings install on npm install without breaking users?
<p>I have an npm package (X) which is written with Typescript and uses types installed with <a href="https://www.npmjs.com/package/typings" rel="nofollow">typings</a>.</p>

<p>I have not committed the typings directory generated by typings because I have a typings.json from which the typings tool can re-generate that directory. In fact, I added typings as a devDependency and an npm script "postinstall" to run "typings install", so any new developers can have everything set up after they run "npm install" on a fresh checkout.</p>

<p>The problem is, there's another package using this one (e.g. Y). When a user goes to "npm install Y", they pull down X and the "postinstall" script is running on their machines. Typings is a devDependency so it's not downloaded (nor do I want it to be for them - they're not developing on X). Nor do they have typings installed globally, so their install of Y errors out.</p>

<p>What's the proper solution? Should I commit typings? Or is there another npm lifecycle script which only runs after install if "npm install" with no args is executed? Or something else?</p>

<p>Thanks!</p>