Adding ability to disable npm install silent flag

This commit is contained in:
Derek Schaller 2015-12-12 21:23:36 -08:00
parent 8b336dc1b4
commit 428b53e647

View File

@ -65,7 +65,8 @@ def install(pkg=None,
dir=None,
runas=None,
registry=None,
env=None):
env=None,
silent=True):
'''
Install an NPM package.
@ -101,6 +102,11 @@ def install(pkg=None,
.. versionadded:: 2014.7.0
silent
Wether or not to run NPM install with --silent flag.
.. versionadded::2015.9.0
CLI Example:
.. code-block:: bash
@ -120,8 +126,10 @@ def install(pkg=None,
pkgs = pkg_list
if registry:
registry = _cmd_quote(registry)
cmd = ['npm', 'install', '--silent', '--json']
cmd = ['npm', 'install']
if silent:
cmd.append(['--silent'])
cmd.append(['--json'])
if dir is None:
cmd.append(' --global')