capistrano-npm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +6 -1
- data/capistrano-npm.gemspec +2 -2
- data/lib/capistrano/tasks/npm.rake +49 -4
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NGY3YzY5ZGQyYzQwODMwNjQ3ZmIwNjE3YmE4ZWEyOWE5MTRhZWU3Mw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cdec96f5506c5122f30808b0bfd9233dd2f62196
|
4
|
+
data.tar.gz: 0d091606ace374d5d72d6684107867a90f0e9649
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NWQ4MjMzMDg4ZWUwZWQzMmFiM2QwZDY1YWI1ODhiMWQ3MDMxOTA1MWE0MWYy
|
11
|
-
YWY3YzMwNTIwMTI2YjZhMWZjNzhjM2ZhNzYxNjA2ZWUwYzc5ZWM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YThmMzI2ZTI2NTUyNGQwNmJlZWM5ZGM4MTJhYjhhY2JmOWU4MTQzNDc5NmQ3
|
14
|
-
N2YxNGRjMWViMWM5MTAxOTA3ODcxMjhkZWJkMjVhZDEzMjNhM2U0NGU4OGNi
|
15
|
-
MDU0MjZmMDE2YmMwMjY0ZTRiZTE2NzcxN2M1NmQ1M2JiOGMwZWU=
|
6
|
+
metadata.gz: f5f9df5b3d8f00b547356c635a48af7a3bc2e22fed496450432aa662bc69a3fa3db183e368b92742687fe1a16a724256eb8e4a32910c6347b6cab42914659d71
|
7
|
+
data.tar.gz: 05bffd2aedf84f8e7640c696a60edbeaada643b78cd9e21ac3ef2bd65fd4d27359b35424fcf8a20af5448733e0004b5fb3f93f42a4db75e52e50a480ab36fe79
|
data/README.md
CHANGED
@@ -34,10 +34,15 @@ Configurable options:
|
|
34
34
|
|
35
35
|
```ruby
|
36
36
|
set :npm_target_path, -> { release_path.join('subdir') } # default not set
|
37
|
-
set :npm_flags, '--production --silent'
|
37
|
+
set :npm_flags, '--production --silent --no-spin' # default
|
38
38
|
set :npm_roles, :all # default
|
39
|
+
set :npm_env_variables, {} # default
|
39
40
|
```
|
40
41
|
|
42
|
+
### Dependencies
|
43
|
+
|
44
|
+
npm allows for normal `dependencies` and `devDependencies`. By default this gem uses `'--production --silent --no-spin'` as the install flags which will **only** install `dependencies` and skip `devDependencies`. If you want your `devDependencies` installed as well, then remove '--production`.
|
45
|
+
|
41
46
|
## Contributing
|
42
47
|
|
43
48
|
1. Fork it
|
data/capistrano-npm.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-npm'
|
7
|
-
spec.version = '1.0.
|
7
|
+
spec.version = '1.0.1'
|
8
8
|
spec.authors = ['Scott Walkinshaw']
|
9
9
|
spec.email = ['scott.walkinshaw@gmail.com']
|
10
10
|
spec.description = %q{npm support for Capistrano 3.x}
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_dependency 'capistrano', '>= 3.0.0
|
20
|
+
spec.add_dependency 'capistrano', '>= 3.0.0'
|
21
21
|
|
22
22
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
23
23
|
spec.add_development_dependency 'rake'
|
@@ -2,28 +2,73 @@ namespace :npm do
|
|
2
2
|
desc <<-DESC
|
3
3
|
Install the project dependencies via npm. By default, devDependencies \
|
4
4
|
will not be installed. The install command is executed \
|
5
|
-
with the --production and --
|
5
|
+
with the --production, --silent and --no-spin flags.
|
6
6
|
|
7
7
|
You can override any of these defaults by setting the variables shown below.
|
8
8
|
|
9
9
|
set :npm_target_path, nil
|
10
|
-
set :npm_flags, '--production --silent'
|
10
|
+
set :npm_flags, '--production --silent --no-spin'
|
11
11
|
set :npm_roles, :all
|
12
|
+
set :npm_env_variables, {}
|
12
13
|
DESC
|
13
14
|
task :install do
|
14
15
|
on roles fetch(:npm_roles) do
|
15
16
|
within fetch(:npm_target_path, release_path) do
|
16
|
-
|
17
|
+
with fetch(:npm_env_variables, {}) do
|
18
|
+
execute :npm, 'install', fetch(:npm_flags)
|
19
|
+
end
|
17
20
|
end
|
18
21
|
end
|
19
22
|
end
|
20
23
|
|
21
24
|
before 'deploy:updated', 'npm:install'
|
25
|
+
|
26
|
+
desc <<-DESC
|
27
|
+
Remove extraneous packages via npm. This command is executed within \
|
28
|
+
the same context as npm install using the npm_roles and npm_target_path \
|
29
|
+
variables.
|
30
|
+
|
31
|
+
By default prune will be executed with the --production flag. You can \
|
32
|
+
override this default by setting the variable shown below.
|
33
|
+
|
34
|
+
set :npm_prune_flags, '--production'
|
35
|
+
|
36
|
+
This task is strictly opt-in. If you want to run it on every deployment \
|
37
|
+
before you run npm install, add the following to your deploy.rb.
|
38
|
+
|
39
|
+
before 'npm:install', 'npm:prune'
|
40
|
+
DESC
|
41
|
+
task :prune do
|
42
|
+
on roles fetch(:npm_roles) do
|
43
|
+
within fetch(:npm_target_path, release_path) do
|
44
|
+
execute :npm, 'prune', fetch(:npm_prune_flags)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
desc <<-DESC
|
50
|
+
Rebuild via npm. This command is executed within the same context \
|
51
|
+
as npm install using the npm_roles and npm_target_path \
|
52
|
+
variables.
|
53
|
+
|
54
|
+
This task is strictly opt-in. The main reason you'll want to run this \
|
55
|
+
would be after changing npm versions on the server.
|
56
|
+
DESC
|
57
|
+
task :rebuild do
|
58
|
+
on roles fetch(:npm_roles) do
|
59
|
+
within fetch(:npm_target_path, release_path) do
|
60
|
+
with fetch(:npm_env_variables, {}) do
|
61
|
+
execute :npm, 'rebuild'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
22
66
|
end
|
23
67
|
|
24
68
|
namespace :load do
|
25
69
|
task :defaults do
|
26
|
-
set :npm_flags,
|
70
|
+
set :npm_flags, %w(--production --silent --no-spin)
|
71
|
+
set :npm_prune_flags, '--production'
|
27
72
|
set :npm_roles, :all
|
28
73
|
end
|
29
74
|
end
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-npm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Walkinshaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.0
|
19
|
+
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.0
|
26
|
+
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
description: npm support for Capistrano 3.x
|
@@ -78,17 +78,17 @@ require_paths:
|
|
78
78
|
- lib
|
79
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.2.2
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: npm support for Capistrano 3.x
|