1

Basically I need this:

Npm postinstall only on development

But here on company we have several machines running Windows on development. What to do?

Community
  • 1
  • 1

1 Answers1

1

On Windows you can use the format IF NOT %NODE_ENV% == production <script here>. I have this in package.json to run bower & typings when doing a dev (non-production) install:

"scripts": {
    "postinstall": "IF NOT %NODE_ENV% == production (bower install & typings install)"
}

See for example SS64 for documentation of available commands etc.

htuomola
  • 715
  • 4
  • 9