capistrano-npm-build 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +37 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/Rakefile +1 -0
- data/capistrano-npm-build.gemspec +24 -0
- data/lib/capistrano-npm-build.rb +0 -0
- data/lib/capistrano/npm_build.rb +1 -0
- data/lib/capistrano/tasks/npm_build.rake +40 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9e0cd6c8389f4a389cf9818369aef665ea04d6e39cf2bdffa3682243787f455e
|
4
|
+
data.tar.gz: 59e608c30bfe7421711bee9e93c798e0e1f68d6a6d5feeea1e18451699585d0d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 523dc0f27a234fcd3b55f0f1ce865b4907f21277980b9584be1c520a919cd42dc45488d3601c8fc8b40b3461a9e80d1502b101c21429bc31383fddb3febc9f8e
|
7
|
+
data.tar.gz: 69d50fca8d374b88c3e3624b53abbc009bfd5ec8c2f34f805b2cf6426c00c124436cbb4bd960cdd8076da9474c8d0b29f78d105ea3b0251cc9d63ea57e72d24e
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano-npm-build (1.0.1)
|
5
|
+
capistrano (>= 3.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
airbrussh (1.3.0)
|
11
|
+
sshkit (>= 1.6.1, != 1.7.0)
|
12
|
+
capistrano (3.10.2)
|
13
|
+
airbrussh (>= 1.0.0)
|
14
|
+
i18n
|
15
|
+
rake (>= 10.0.0)
|
16
|
+
sshkit (>= 1.9.0)
|
17
|
+
concurrent-ruby (1.0.5)
|
18
|
+
i18n (1.0.1)
|
19
|
+
concurrent-ruby (~> 1.0)
|
20
|
+
net-scp (1.2.1)
|
21
|
+
net-ssh (>= 2.6.5)
|
22
|
+
net-ssh (4.2.0)
|
23
|
+
rake (12.3.1)
|
24
|
+
sshkit (1.16.1)
|
25
|
+
net-scp (>= 1.1.2)
|
26
|
+
net-ssh (>= 2.8.0)
|
27
|
+
|
28
|
+
PLATFORMS
|
29
|
+
ruby
|
30
|
+
|
31
|
+
DEPENDENCIES
|
32
|
+
bundler (~> 1.3)
|
33
|
+
capistrano-npm-build!
|
34
|
+
rake
|
35
|
+
|
36
|
+
BUNDLED WITH
|
37
|
+
1.16.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 DevScouts
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Capistrano::npm::Build
|
2
|
+
|
3
|
+
npm support for Capistrano 3.x
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'capistrano', '~> 3.1.0'
|
11
|
+
gem 'capistrano-npm-build'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install capistrano-npm-build
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Require in `Capfile` to use the default task:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'capistrano/npm_build'
|
28
|
+
```
|
29
|
+
|
30
|
+
The task will run before `deploy:updated` as part of Capistrano's default deploy,
|
31
|
+
or can be run in isolation with `cap production npm:install`
|
32
|
+
|
33
|
+
Configurable options:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
set :npm_target_path, -> { release_path.join('subdir') } # default not set
|
37
|
+
set :npm_flags, '--production --silent --no-progress' # default
|
38
|
+
set :npm_roles, :all # default
|
39
|
+
set :npm_env_variables, {} # default
|
40
|
+
```
|
41
|
+
|
42
|
+
### Dependencies
|
43
|
+
|
44
|
+
npm allows for normal `dependencies` and `devDependencies`. By default this gem uses `'--production --silent --no-progress'` as the install flags which will **only** install `dependencies` and skip `devDependencies`. If you want your `devDependencies` installed as well, then remove `--production`.
|
45
|
+
|
46
|
+
## Contributing
|
47
|
+
|
48
|
+
1. Fork it
|
49
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
50
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
51
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
52
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'capistrano-npm-build'
|
7
|
+
spec.version = '1.0.1'
|
8
|
+
spec.authors = ['Abhilash Reddy']
|
9
|
+
spec.email = ['abhilashmv@outlook.com']
|
10
|
+
spec.description = %q{npm build support for Capistrano 3.x}
|
11
|
+
spec.summary = %q{npm build support for Capistrano 3.x}
|
12
|
+
spec.homepage = 'https://github.com/DevScoutsCom/capistrano-npm-build'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_dependency 'capistrano', '>= 3.0.0'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/npm_build.rake', __FILE__)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
namespace :npm do
|
2
|
+
task :install do
|
3
|
+
on roles fetch(:npm_roles) do
|
4
|
+
within fetch(:npm_target_path, release_path) do
|
5
|
+
with fetch(:npm_env_variables, {}) do
|
6
|
+
execute :npm, 'install', fetch(:npm_flags)
|
7
|
+
# execute "sh -c \"cd #{fetch(:deploy_to)}/current/ && #{fetch(:build_command)}\""
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
before 'deploy:updated', 'npm:install'
|
14
|
+
|
15
|
+
task :prune do
|
16
|
+
on roles fetch(:npm_roles) do
|
17
|
+
within fetch(:npm_target_path, release_path) do
|
18
|
+
execute :npm, 'prune', fetch(:npm_prune_flags)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
task :rebuild do
|
24
|
+
on roles fetch(:npm_roles) do
|
25
|
+
within fetch(:npm_target_path, release_path) do
|
26
|
+
with fetch(:npm_env_variables, {}) do
|
27
|
+
execute :npm, 'rebuild'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
namespace :load do
|
35
|
+
task :defaults do
|
36
|
+
set :npm_flags, %w(--production --silent --no-progress)
|
37
|
+
set :npm_prune_flags, '--production'
|
38
|
+
set :npm_roles, :all
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-npm-build
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Abhilash Reddy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-05-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: npm build support for Capistrano 3.x
|
56
|
+
email:
|
57
|
+
- abhilashmv@outlook.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- Gemfile
|
63
|
+
- Gemfile.lock
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- capistrano-npm-build.gemspec
|
68
|
+
- lib/capistrano-npm-build.rb
|
69
|
+
- lib/capistrano/npm_build.rb
|
70
|
+
- lib/capistrano/tasks/npm_build.rake
|
71
|
+
homepage: https://github.com/DevScoutsCom/capistrano-npm-build
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.7.6
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: npm build support for Capistrano 3.x
|
95
|
+
test_files: []
|