MCPcopy
hub / github.com/ampproject/amphtml / InstallNodeDependencies

Function InstallNodeDependencies

validator/build.py:119–133  ·  view source on GitHub ↗

Installs the dependencies using npm install.

()

Source from the content-addressed store, hash-verified

117
118
119def InstallNodeDependencies():
120 """Installs the dependencies using npm install."""
121 logging.info('entering ...')
122 # Install the project dependencies specified in package.json into
123 # node_modules.
124 logging.info('installing AMP Validator engine dependencies ...')
125 subprocess.check_call(
126 ['npm', 'install', '--userconfig', '../.npmrc'],
127 stdout=(open(os.devnull, 'wb') if os.environ.get('CI') else sys.stdout))
128 logging.info('installing AMP Validator nodejs dependencies ...')
129 subprocess.check_call(['npm', 'install', '--userconfig', '../../../.npmrc'],
130 cwd='js/nodejs',
131 stdout=(open(os.devnull, 'wb')
132 if os.environ.get('CI') else sys.stdout))
133 logging.info('... done')
134
135
136def GenValidatorPb2Py(out_dir):

Callers 1

MainFunction · 0.70

Calls 3

openFunction · 0.85
infoMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected