Sha256: f770502ce5c4c3b98cef6a0af70152d1a81ac14a69c2e13212e481d6c48cf0df
Contents?: true
Size: 982 Bytes
Versions: 1
Compression:
Stored size: 982 Bytes
Contents
namespace :npm do task :install do on roles fetch(:npm_roles) do within fetch(:npm_target_path, release_path) do with fetch(:npm_env_variables, {}) do execute :npm, 'install', fetch(:npm_flags) execute "sh -c \"cd #{fetch(:deploy_to)}/current/ && #{fetch(:build_command)}\"" end end end end before 'deploy:updated', 'npm:install' task :prune do on roles fetch(:npm_roles) do within fetch(:npm_target_path, release_path) do execute :npm, 'prune', fetch(:npm_prune_flags) end end end task :rebuild do on roles fetch(:npm_roles) do within fetch(:npm_target_path, release_path) do with fetch(:npm_env_variables, {}) do execute :npm, 'rebuild' end end end end end namespace :load do task :defaults do set :npm_flags, %w(--production --silent --no-progress) set :npm_prune_flags, '--production' set :npm_roles, :all end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capistrano-npm-build-2.0 | lib/capistrano/tasks/npm_build.rake |