Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Npm support: use local dependencies on deeper level
Browse files Browse the repository at this point in the history
Change-Id: I2c01f90ede16e8768add976dfdc47e8430c5f8ae
  • Loading branch information
mariash committed Oct 10, 2012
1 parent bea9997 commit 2c300d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/vcap/staging/plugin/node/npm_support/npm_package.rb
Expand Up @@ -162,6 +162,11 @@ def get_cached_from_registry

def copy_to_dst(source)
return unless source && File.exists?(source)
# Save module dependencies from local path
deps_dir = File.join(@package_path, "node_modules")
if File.exists?(deps_dir)
`cp -a #{shellescape(deps_dir)} #{shellescape(source)}`
end
FileUtils.rm_rf(@package_path)
FileUtils.mkdir_p(@package_path)
`cp -a #{shellescape(source)}/. #{shellescape(@package_path)}`
Expand Down

0 comments on commit 2c300d3

Please sign in to comment.