That can be done using devDependencies
The npm modules which you require only to develop, e.g.: unit tests, Coffeescript to Javascript transpilation, minification etc,make the required module a devDependency.
To skip Installation of devDepenencies pass --production
flag to npm install
,with the --production
flag(or NODE_ENV
environment variable set to production
) npm
will not install modules listed in devDependencies.”
npm install --production
To make any module to be part of devDependencies pass –dev while installing.
npm install packagename --save-dev