k_director 0.9.0 → 0.10.0

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: 4a7a7b652cc348b24d223f9c0df0d39443a61699e6b7221eaa65499d517f155b
4
- data.tar.gz: 7b196d138fa1953a54562e0e381aee32754b55f43eada1981ac45db973c55209
3
+ metadata.gz: 741cb887f450ab36a09fb0a8cbdfae5f3fbb0c61699c0f85b45489f70a370e8a
4
+ data.tar.gz: 50bbfab6ae514ffdbcd779519d10a1235aa5df76932f5a0e7d5b67f3eb3b8f5e
5
5
  SHA512:
6
- metadata.gz: 03cb460ca47b4c4c5ef5f355ef13882ffd1b38b9590ecba60eb4c49551efe91d067029c79c02b9e5526a12677b23cbd87accf473650c62daa1ca91de4b71be8c
7
- data.tar.gz: 14294acc2367c38f19f7c1ccb5dcecdcbf58bd86fc754bce974de4bb75ad635a8b21b36d698362d08d5eb584e0da23c4475c81d7938f697cf30f9de0d704dc51
6
+ metadata.gz: 2fc8d306520190e022aec53d56750cdff63d70dd56b70041389aaac086d954ad11d370df325cedddaaba428063c61492b71681f36ac3049a05334702bc986bc5
7
+ data.tar.gz: baad0f5b9986f35880cb86b1da28670c114b1c307bf04651979968f765f3eaabd7ed106ae848ddc4abec299ca7bbf9221c9ec1d36621dcdb7d2e38295be875d0
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.9.0](https://github.com/klueless-io/k_director/compare/v0.8.1...v0.9.0) (2022-02-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * add package_json dsl support ([15b3ad7](https://github.com/klueless-io/k_director/commit/15b3ad7472a3374e646c391a7271fb7782636afe))
7
+
1
8
  ## [0.8.1](https://github.com/klueless-io/k_director/compare/v0.8.0...v0.8.1) (2022-02-05)
2
9
 
3
10
 
@@ -169,6 +169,7 @@ module KDirector
169
169
  def set(key, value)
170
170
  load
171
171
 
172
+ key = key.to_s.strip
172
173
  @package[key] = value
173
174
 
174
175
  write
@@ -176,6 +177,18 @@ module KDirector
176
177
  self
177
178
  end
178
179
 
180
+ # Package.sort using `npx sort-package-json`
181
+ # ----------------------------------------------------------------------
182
+
183
+ # Sort the package.json keys using `npx sort-package-json`
184
+ def sort
185
+ run_command 'npx sort-package-json'
186
+
187
+ load
188
+
189
+ self
190
+ end
191
+
179
192
  # Dependency option
180
193
  # ----------------------------------------------------------------------
181
194
 
@@ -259,7 +272,7 @@ module KDirector
259
272
  # run_command "code #{package_file}"
260
273
  # end
261
274
 
262
- # private
275
+ private
263
276
 
264
277
  def get_group(key)
265
278
  group = configuration.package_json.package_groups[key]
@@ -37,11 +37,11 @@ module KDirector
37
37
 
38
38
  # Setup the default package groups
39
39
  def set_default_package_groups
40
- set_package_group('webpack' , 'Webpack V5', %w[webpack webpack-cli webpack-dev-server])
41
- set_package_group('swc' , 'SWC Transpiler', %w[@swc/cli @swc/core swc-loader])
42
- set_package_group('babel' , 'Babel Transpiler', %w[@babel/core @babel/cli @babel/preset-env babel-loader])
43
- set_package_group('typescript' , 'Typescript', %w[typescript ts-loader])
44
- set_package_group('semantic-release', 'Semantic Release', %w[semantic-release github:klueless-js/semantic-release-rubygem @semantic-release/changelog @semantic-release/git])
40
+ set_package_group('webpack' , 'Webpack V5' , %w[webpack webpack-cli webpack-dev-server])
41
+ set_package_group('swc' , 'SWC Transpiler' , %w[@swc/cli @swc/core swc-loader])
42
+ set_package_group('babel' , 'Babel Transpiler' , %w[@babel/core @babel/cli @babel/preset-env babel-loader])
43
+ set_package_group('typescript' , 'Typescript' , %w[typescript ts-loader])
44
+ set_package_group('semantic-release', 'Semantic Release' , %w[semantic-release github:klueless-js/semantic-release-rubygem @semantic-release/changelog @semantic-release/git])
45
45
  end
46
46
 
47
47
  def debug
@@ -10,14 +10,21 @@ module KDirector
10
10
 
11
11
  def github(**opts, &block)
12
12
  github = KDirector::Dsls::Children::Github.new(self, **opts)
13
- github.instance_eval(&block)
13
+ github.instance_eval(&block) if block_given?
14
+
15
+ self
16
+ end
17
+
18
+ def package_json(**opts, &block)
19
+ package_json = KDirector::Dsls::Children::PackageJson.new(self, **opts)
20
+ package_json.instance_eval(&block) if block_given?
14
21
 
15
22
  self
16
23
  end
17
24
 
18
25
  def blueprint(**opts, &block)
19
26
  blueprint = KDirector::Dsls::Children::Blueprint.new(self, **opts)
20
- blueprint.instance_eval(&block)
27
+ blueprint.instance_eval(&block) if block_given?
21
28
 
22
29
  self
23
30
  end
@@ -15,6 +15,13 @@ module KDirector
15
15
  self
16
16
  end
17
17
 
18
+ def package_json(**opts, &block)
19
+ package_json = KDirector::Dsls::Children::PackageJson.new(self, **opts)
20
+ package_json.instance_eval(&block) if block_given?
21
+
22
+ self
23
+ end
24
+
18
25
  def blueprint(**opts, &block)
19
26
  blueprint = KDirector::Dsls::Children::Blueprint.new(self, **opts)
20
27
  blueprint.instance_eval(&block) if block_given?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.9.0'
4
+ VERSION = '0.10.0'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_director",
9
- "version": "0.9.0",
9
+ "version": "0.10.0",
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.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Command line and CI/CD tools for k_director",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_director
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-05 00:00:00.000000000 Z
11
+ date: 2022-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: k_config