k_director 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '080f78bce274be30bf0b77765c7fe6b40c56a9a5f40b385dd55ed96cd81b440b'
4
- data.tar.gz: 7f12eeaf1ccdac94be739700260e30282766f85f9d4fad8f6e9cb81bd47359f0
3
+ metadata.gz: fb7ed7623517d20d588f3fd176ee05dd8d28161d5164b099eaef39152475735d
4
+ data.tar.gz: 54b3ce3d61554f6d6f85b82167b9f1fcb82de4ccaacd7ec970ca68ae8cf07ccf
5
5
  SHA512:
6
- metadata.gz: 20fb925316d432b16e5ac5b5074f5e2d86845225262dae2460962b51199555d757e889a8a3fdd62b86dab2f60b7f35c5892a875b530369b9d83268e52d657be2
7
- data.tar.gz: 2e5d5485a94a94cbfa2a86110e7bea1a5af50b32febc51830d935b5e4592ddc1bcd9d4424044acbb3d0ec0b606197e1c674bac57e43ccd5386a70bd1a0663272
6
+ metadata.gz: d25fbb9ad8b1dcd71b6fb7a56a31d5a54022071f28559d0e31bb1d53b3274e6287342f87cca3ea2f0e7dd812f436db2eb4458454266e83ea5f9c4202d9d2ad34
7
+ data.tar.gz: 486576cb37d37f4e973df1a4baf0a1430188d29a525fddc64b79528ed16f2bb830aa04de81fe65e94a3a258c5d8d75d1d901a7d1f272859f84430ad9cb48a1c8
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [0.10.2](https://github.com/klueless-io/k_director/compare/v0.10.1...v0.10.2) (2022-02-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * package_json, remove_package_lcok, remove_yarn_locak, create_yarn_lock ([d69c6a5](https://github.com/klueless-io/k_director/commit/d69c6a53a80551cdf5ac73024de8d2e597c37614))
7
+ * package_json, remove_package_lcok, remove_yarn_locak, create_yarn_lock ([fdeef48](https://github.com/klueless-io/k_director/commit/fdeef481763160ca0c8d306491d7eb2e29536641))
8
+
1
9
  ## [0.10.1](https://github.com/klueless-io/k_director/compare/v0.10.0...v0.10.1) (2022-02-06)
2
10
 
3
11
 
@@ -159,6 +159,28 @@ module KDirector
159
159
  @package
160
160
  end
161
161
 
162
+ # Package.settings is a hash of settings that can be applied to package.json
163
+ # ----------------------------------------------------------------------
164
+
165
+ # Settings
166
+ #
167
+ # Add multiple settings to the package.json
168
+ # @param opts [Hash] Hash of settings to add
169
+ # opts[:group] is the group to add the settings to
170
+ def settings(**opts)
171
+ load
172
+
173
+ group = opts.delete(:group)
174
+
175
+ opts.each do |key, value|
176
+ set_key_value(key, value, group: group)
177
+ end
178
+
179
+ write
180
+
181
+ self
182
+ end
183
+
162
184
  # Package.set
163
185
  # ----------------------------------------------------------------------
164
186
 
@@ -166,15 +188,7 @@ module KDirector
166
188
  def set(key, value, group: nil)
167
189
  load
168
190
 
169
- key = key.to_s.strip
170
-
171
- if group.nil?
172
- @package[key] = value
173
- else
174
- group = group.to_s.strip
175
- @package[group] = {} unless @package[group]
176
- @package[group][key] = value
177
- end
191
+ set_key_value(key, value, group: group)
178
192
 
179
193
  write
180
194
 
@@ -331,6 +345,18 @@ module KDirector
331
345
  group
332
346
  end
333
347
 
348
+ def set_key_value(key, value, group: nil)
349
+ key = key.to_s.strip
350
+
351
+ if group.nil?
352
+ @package[key] = value
353
+ else
354
+ group = group.to_s.strip
355
+ @package[group] = {} unless @package[group]
356
+ @package[group][key] = value
357
+ end
358
+ end
359
+
334
360
  def run_command(command)
335
361
  parent.k_builder.run_command(command)
336
362
  end
@@ -55,7 +55,6 @@ module KDirector
55
55
  autoprefixer@latest
56
56
  ])
57
57
 
58
- # this does not work yet
59
58
  set_package_group('storybook-nuxt' , 'Storybook for (Vite/Nuxt)' , %w[
60
59
  @storybook/vue3@6.4.18
61
60
  @storybook/addon-postcss@2.0.0
@@ -63,7 +62,7 @@ module KDirector
63
62
  storybook-builder-vite
64
63
  ])
65
64
 
66
- # Currently these two need to be foreced
65
+ # Currently these two need to be forced
67
66
  # @storybook/addon-docs@6.4.18
68
67
  # @storybook/addon-essentials@6.4.18
69
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.10.2'
4
+ VERSION = '0.10.3'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_director",
9
- "version": "0.10.2",
9
+ "version": "0.10.3",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "Command line and CI/CD tools for k_director",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_director
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys