node_cache: Rename npm_cache to target_path.

This is cleaner and part of renaming these variables to refer to the
node_modules_cache.
This commit is contained in:
Tim Abbott
2017-07-21 16:21:01 -07:00
parent e1e5e15797
commit b7211733e2

View File

@@ -34,12 +34,12 @@ def setup_node_modules(production=False, stdout=None, stderr=None, copy_modules=
else:
npm_args = []
sha1sum = generate_sha1sum_node_modules(npm_args)
npm_cache = os.path.join(NODE_MODULES_CACHE_PATH, sha1sum)
cached_node_modules = os.path.join(npm_cache, 'node_modules')
success_stamp = os.path.join(npm_cache, '.success-stamp')
target_path = os.path.join(NODE_MODULES_CACHE_PATH, sha1sum)
cached_node_modules = os.path.join(target_path, 'node_modules')
success_stamp = os.path.join(target_path, '.success-stamp')
# Check if a cached version already exists
if not os.path.exists(success_stamp):
do_npm_install(npm_cache,
do_npm_install(target_path,
npm_args,
success_stamp,
stdout=stdout,