lib/capistrano/node-deploy.rb in capistrano-node-deploy-1.2.8 vs lib/capistrano/node-deploy.rb in capistrano-node-deploy-1.2.9
- old
+ new
@@ -68,10 +68,10 @@
desc "Check required packages and install if packages are not installed"
task :install_packages do
run "mkdir -p #{shared_path}/node_modules"
run "cp #{release_path}/package.json #{shared_path}"
run "cp #{release_path}/npm-shrinkwrap.json #{shared_path}" if remote_file_exists?("#{release_path}/npm-shrinkwrap.json")
- run "cd #{shared_path} && npm install #{(node_env != 'production') ? '--dev' : ''} --loglevel warn"
+ run "cd #{shared_path} && npm install #{(node_env == 'production') ? '--production' : '--dev' } --loglevel warn"
run "ln -s #{shared_path}/node_modules #{release_path}/node_modules"
end
task :check_upstart_config do
create_upstart_config if remote_file_differs?(upstart_file_path, upstart_file_contents)