rake_npm 0.1.0.pre.8 → 0.1.0.pre.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rake_npm/mixins/directoried.rb +15 -0
- data/lib/rake_npm/tasks/install.rb +24 -5
- data/lib/rake_npm/tasks/run_script.rb +26 -3
- data/lib/rake_npm/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f2e47d9bf4395c8065606e3032fc316fa8b387307959f9af24716dd313c6935
|
4
|
+
data.tar.gz: 5376c6177750c13eeb90c8790e044e6b03d192eb1fa3fefb5181aad7d020b8da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ffa91b7183597d65b8693b9ba5d36d5a43ef756fc6cb91f8578d7ca36032ab5fea11ae843dd166c522b939c3375673a219f14aa307040030bf845cd52d71e9c
|
7
|
+
data.tar.gz: 8e85c3124e51f710962c2d9f3b754228bcc00f15d00cccac29e883e138b46b56133800182485da19fdf4a1a6cd9108ce7d898794b7c9780553ac0fa4684d1987
|
data/Gemfile.lock
CHANGED
@@ -3,9 +3,13 @@
|
|
3
3
|
require 'rake_factory'
|
4
4
|
require 'ruby_npm'
|
5
5
|
|
6
|
+
require_relative '../mixins/directoried'
|
7
|
+
|
6
8
|
module RakeNPM
|
7
9
|
module Tasks
|
8
10
|
class Install < RakeFactory::Task
|
11
|
+
include Mixins::Directoried
|
12
|
+
|
9
13
|
default_name :install
|
10
14
|
default_description(RakeFactory::DynamicValue.new do |_t|
|
11
15
|
'Install NPM dependencies'
|
@@ -15,13 +19,28 @@ module RakeNPM
|
|
15
19
|
parameter :fund, default: false
|
16
20
|
parameter :audit, default: true
|
17
21
|
|
22
|
+
parameter :directory
|
23
|
+
|
24
|
+
parameter :environment, default: {}
|
25
|
+
|
18
26
|
action do |task|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
audit: task.audit
|
27
|
+
logged_directory = task.directory || '.'
|
28
|
+
puts(
|
29
|
+
'Installing NPM dependencies ' \
|
30
|
+
"in directory: '#{logged_directory}'..."
|
24
31
|
)
|
32
|
+
in_directory(task.directory) do
|
33
|
+
RubyNPM.install(
|
34
|
+
{
|
35
|
+
color: task.color,
|
36
|
+
fund: task.fund,
|
37
|
+
audit: task.audit
|
38
|
+
},
|
39
|
+
{
|
40
|
+
environment: task.environment
|
41
|
+
}
|
42
|
+
)
|
43
|
+
end
|
25
44
|
end
|
26
45
|
end
|
27
46
|
end
|
@@ -3,9 +3,13 @@
|
|
3
3
|
require 'rake_factory'
|
4
4
|
require 'ruby_npm'
|
5
5
|
|
6
|
+
require_relative '../mixins/directoried'
|
7
|
+
|
6
8
|
module RakeNPM
|
7
9
|
module Tasks
|
8
10
|
class RunScript < RakeFactory::Task
|
11
|
+
include Mixins::Directoried
|
12
|
+
|
9
13
|
default_name :run_script
|
10
14
|
default_description(RakeFactory::DynamicValue.new do |t|
|
11
15
|
"Runs the NPM #{t.script} script"
|
@@ -13,11 +17,30 @@ module RakeNPM
|
|
13
17
|
|
14
18
|
parameter :script, required: true
|
15
19
|
|
20
|
+
parameter :color, default: 'always'
|
21
|
+
|
22
|
+
parameter :environment, default: {}
|
23
|
+
|
24
|
+
parameter :directory
|
25
|
+
|
16
26
|
action do |task|
|
17
|
-
|
18
|
-
|
19
|
-
script: task.script
|
27
|
+
logged_directory = task.directory || '.'
|
28
|
+
puts(
|
29
|
+
"Running NPM script: '#{task.script}' " \
|
30
|
+
"in directory: '#{logged_directory}'..."
|
20
31
|
)
|
32
|
+
|
33
|
+
in_directory(task.directory) do
|
34
|
+
RubyNPM.run_script(
|
35
|
+
{
|
36
|
+
script: task.script,
|
37
|
+
color: task.color
|
38
|
+
},
|
39
|
+
{
|
40
|
+
environment: task.environment
|
41
|
+
}
|
42
|
+
)
|
43
|
+
end
|
21
44
|
end
|
22
45
|
end
|
23
46
|
end
|
data/lib/rake_npm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake_npm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- InfraBlocks Maintainers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored2
|
@@ -279,6 +279,7 @@ files:
|
|
279
279
|
- bin/console
|
280
280
|
- bin/setup
|
281
281
|
- lib/rake_npm.rb
|
282
|
+
- lib/rake_npm/mixins/directoried.rb
|
282
283
|
- lib/rake_npm/task_sets.rb
|
283
284
|
- lib/rake_npm/task_sets/npm.rb
|
284
285
|
- lib/rake_npm/tasks.rb
|