capistrano-yarn 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/LICENSE.txt +22 -0
- data/README.md +52 -0
- data/Rakefile +1 -0
- data/capistrano-yarn.gemspec +24 -0
- data/lib/capistrano-yarn.rb +0 -0
- data/lib/capistrano/tasks/yarn.rake +76 -0
- data/lib/capistrano/yarn.rb +1 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7d404f7c54d40644b695b485db670275ed77d3f1
|
4
|
+
data.tar.gz: 86cb0bf8cc3ae94c33838d56034572a7bfe89f5b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e8d4653f490647e6ea5bdecbd589eb22f15e98d06597a1020008b75ea2f4ebe2ad79bd04f542065f68eabc4ef934a26d8ea4f564ac3d292237147fb936e2cf2a
|
7
|
+
data.tar.gz: ec8e4db34d18fb20b8c976233d68213c712b319b442bcfe2386ab63c4d14bede1759aaaf2d79e8a962ff29defd7fc2c0dcc083a918d2d0a09507cf7c03ae251b
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Capistrano, your one stop deployment shop.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
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, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2016
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Capistrano::yarn
|
2
|
+
|
3
|
+
yarn 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-yarn'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install capistrano-yarn
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Require in `Capfile` to use the default task:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'capistrano/yarn'
|
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 yarn:install`
|
32
|
+
|
33
|
+
Configurable options:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
set :yarn_target_path, -> { release_path.join('subdir') } # default not set
|
37
|
+
set :yarn_flags, '--production --silent --no-progress' # default
|
38
|
+
set :yarn_roles, :all # default
|
39
|
+
set :yarn_env_variables, {} # default
|
40
|
+
```
|
41
|
+
|
42
|
+
### Dependencies
|
43
|
+
|
44
|
+
yarn 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-yarn'
|
7
|
+
spec.version = '2.0.0'
|
8
|
+
spec.authors = ['Jesus Arnaiz']
|
9
|
+
spec.email = ['j.arnaiz@gmail.com']
|
10
|
+
spec.description = 'based on capistrano/npm gem'
|
11
|
+
spec.summary = 'yarn support for Capistrano 3.x'
|
12
|
+
spec.homepage = 'https://github.com/j-arnaiz/capistrano-yarn'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files`.split($RS)
|
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'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
end
|
File without changes
|
@@ -0,0 +1,76 @@
|
|
1
|
+
namespace :yarn do
|
2
|
+
desc <<-DESC
|
3
|
+
Install the project dependencies via yarn. By default, devDependencies \
|
4
|
+
will not be installed. The install command is executed \
|
5
|
+
with the --production, --silent and --no-spin flags.
|
6
|
+
|
7
|
+
You can override any of these defaults by setting the variables shown below.
|
8
|
+
|
9
|
+
set :yarn_target_path, nil
|
10
|
+
set :yarn_flags, '--production --silent --no-spin'
|
11
|
+
set :yarn_roles, :all
|
12
|
+
set :yarn_env_variables, {}
|
13
|
+
set :yarn_bin, :yarn
|
14
|
+
DESC
|
15
|
+
task :install do
|
16
|
+
on roles fetch(:yarn_roles) do
|
17
|
+
within fetch(:yarn_target_path, release_path) do
|
18
|
+
with fetch(:yarn_env_variables, {}) do
|
19
|
+
execute fetch(:yarn_bin), 'install', fetch(:yarn_flags)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
before 'deploy:updated', 'yarn:install'
|
26
|
+
|
27
|
+
desc <<-DESC
|
28
|
+
Remove extraneous packages via yarn. This command is executed within \
|
29
|
+
the same context as yarn install using the yarn_roles and yarn_target_path \
|
30
|
+
variables.
|
31
|
+
|
32
|
+
By default prune will be executed with the --production flag. You can \
|
33
|
+
override this default by setting the variable shown below.
|
34
|
+
|
35
|
+
set :yarn_prune_flags, '--production'
|
36
|
+
|
37
|
+
This task is strictly opt-in. If you want to run it on every deployment \
|
38
|
+
before you run yarn install, add the following to your deploy.rb.
|
39
|
+
|
40
|
+
before 'yarn:install', 'yarn:prune'
|
41
|
+
DESC
|
42
|
+
task :prune do
|
43
|
+
on roles fetch(:yarn_roles) do
|
44
|
+
within fetch(:yarn_target_path, release_path) do
|
45
|
+
execute fetch(:yarn_bin), 'prune', fetch(:yarn_prune_flags)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
desc <<-DESC
|
51
|
+
Rebuild via yarn. This command is executed within the same context \
|
52
|
+
as yarn install using the yarn_roles and yarn_target_path \
|
53
|
+
variables.
|
54
|
+
|
55
|
+
This task is strictly opt-in. The main reason you'll want to run this \
|
56
|
+
would be after changing yarn versions on the server.
|
57
|
+
DESC
|
58
|
+
task :rebuild do
|
59
|
+
on roles fetch(:yarn_roles) do
|
60
|
+
within fetch(:yarn_target_path, release_path) do
|
61
|
+
with fetch(:yarn_env_variables, {}) do
|
62
|
+
execute fetch(:yarn_bin), 'rebuild'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
namespace :load do
|
70
|
+
task :defaults do
|
71
|
+
set :yarn_flags, %w(--production --silent --no-progress)
|
72
|
+
set :yarn_prune_flags, '--production'
|
73
|
+
set :yarn_roles, :all
|
74
|
+
set :yarn_bin, :yarn
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/yarn.rake', __FILE__)
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-yarn
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jesus Arnaiz
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-19 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'
|
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'
|
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: based on capistrano/npm gem
|
56
|
+
email:
|
57
|
+
- j.arnaiz@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- Gemfile
|
63
|
+
- LICENSE
|
64
|
+
- LICENSE.txt
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- capistrano-yarn.gemspec
|
68
|
+
- lib/capistrano-yarn.rb
|
69
|
+
- lib/capistrano/tasks/yarn.rake
|
70
|
+
- lib/capistrano/yarn.rb
|
71
|
+
homepage: https://github.com/j-arnaiz/capistrano-yarn
|
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.5.1
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: yarn support for Capistrano 3.x
|
95
|
+
test_files: []
|