tailwind_dsl 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44930845db5a1a2455e4401ba03525dfba9c8efb554c4b418f8d2d874749b893
4
- data.tar.gz: 86218cc6d27c4eb84d795c3563664724509409df9ea9119aa99627771a829e3c
3
+ metadata.gz: 9745acb28cff41075148e24922fe169e2f8c9ef67a6603db4059f3e0d5c34b1a
4
+ data.tar.gz: b2a85dacf9b08fd73250ffb54abcb103f5f7f79a1b92eabb357b11f60ce7ee8f
5
5
  SHA512:
6
- metadata.gz: cfe75290f65ce50885faf30eaeedc5b534ee085c9d0d73fbe56a115a9f922d66e0a084c9b8e783384933b33a280c9d4beb25f6917a063487cfb7ef8db6577fbe
7
- data.tar.gz: 4f5a103b7b1de5e665b8d7a35ce70771478c3d2aeb29fc879e551e8c33ca98fa654e67d0e0dc8885150ed78c9e417361035229913f8d60d6fcd420df400fb445
6
+ metadata.gz: 00e447a6f21e5115f68a23d534fc2ee83749cb331638b3c223f8908a1a3c5225c4c3c67caed92a71e24660dbc24a0c9696638364f3aeb2f10397503c742b4ef3
7
+ data.tar.gz: bc37080b72bd940dc5406ff4fa2f22421488c456e8d4c84a81d038e051227492862fa485c3b0681d297d041b21a3168f514f2295b05a8a8b0a0c55a8b500d76a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## [0.0.4](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.3...v0.0.4) (2022-10-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * after transforemer to etl rename ([66428fe](https://github.com/klueless-io/tailwind_dsl/commit/66428fe3ff3a91ce80a57592877538b8b098c976))
7
+ * before transforemer to etl rename ([7e06c9d](https://github.com/klueless-io/tailwind_dsl/commit/7e06c9da343ea997e731dd2efc344ab77b490786))
8
+ * cops ([6cde6f4](https://github.com/klueless-io/tailwind_dsl/commit/6cde6f4c4a0729bca58a9b5ff4bcfa8c9d66b5ae))
9
+ * quick test of rubocop in GTA ([74e0332](https://github.com/klueless-io/tailwind_dsl/commit/74e0332392ecd131a86387de0b8eeb8db53e3b75))
10
+ * quick test of rubocop in GTA ([ab5fac5](https://github.com/klueless-io/tailwind_dsl/commit/ab5fac53f14cb36c527e90036d5490334b1d0f2a))
11
+ * update domain model documentation ([4d41237](https://github.com/klueless-io/tailwind_dsl/commit/4d412374797fb503af630d0f6f3263f3a9470c85))
12
+ * update domain model documentation ([3c0b5b7](https://github.com/klueless-io/tailwind_dsl/commit/3c0b5b72c3dde21de7b371a3c4a3c7575c08753d))
13
+ * update domain model documentation ([065e84e](https://github.com/klueless-io/tailwind_dsl/commit/065e84e545b190f15cf2e115c8b4084544b092a0))
14
+ * update domain model documentation ([5a041cb](https://github.com/klueless-io/tailwind_dsl/commit/5a041cb648e62baa71e787b359c87e6b327edb1d))
15
+ * update domain model documentation ([31836df](https://github.com/klueless-io/tailwind_dsl/commit/31836df17a03cf13376352243c1b2edc44ce09eb))
16
+ * update domain model documentation ([cb2afd5](https://github.com/klueless-io/tailwind_dsl/commit/cb2afd5a1ddd32fa72f4ee976c02a785de894010))
17
+ * update domain model documentation ([4c45860](https://github.com/klueless-io/tailwind_dsl/commit/4c45860191e2ced0cde46569df6d106d4157a46a))
18
+ * update gem dependancies ([d44c499](https://github.com/klueless-io/tailwind_dsl/commit/d44c4998907e4ba22e51e5c6ca32923f623d994c))
19
+ * update gemspec ([d4428c4](https://github.com/klueless-io/tailwind_dsl/commit/d4428c46247d0ca02390709b545418cf3c224c79))
20
+
1
21
  ## [0.0.3](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.2...v0.0.3) (2022-04-04)
2
22
 
3
23
 
@@ -1,53 +1,55 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindDsl
4
- module RawComponents
5
- # -----------------------------------------------------------------------------------------------
6
- # Internal Data Structure
7
- class Data
8
- attr_reader :design_system_name
9
- attr_reader :group # Component group information
10
- attr_reader :source # Source file information for the component
11
- attr_reader :target # Multiple target file information
4
+ module Etl
5
+ module ComponentStructures
6
+ # -----------------------------------------------------------------------------------------------
7
+ # Internal Data Structure
8
+ class Data
9
+ attr_reader :design_system_name
10
+ attr_reader :group # Component group information
11
+ attr_reader :source # Source file information for the component
12
+ attr_reader :target # Multiple target file information
12
13
 
13
- # Storage buckets for data that is extracted from the source file
14
- attr_accessor :captured_comment_text
15
- attr_accessor :captured_comment_list
16
- attr_accessor :captured_tailwind_config
14
+ # Storage buckets for data that is extracted from the source file
15
+ attr_accessor :captured_comment_text
16
+ attr_accessor :captured_comment_list
17
+ attr_accessor :captured_tailwind_config
17
18
 
18
- # rubocop:disable Metrics/AbcSize
19
- def initialize(design_system_name, group, file)
20
- @design_system_name = design_system_name
19
+ # rubocop:disable Metrics/AbcSize
20
+ def initialize(design_system_name, group, file)
21
+ @design_system_name = design_system_name
21
22
 
22
- @captured_comment_text = ''
23
- @captured_comment_list = []
24
- @captured_tailwind_config = ''
23
+ @captured_comment_text = ''
24
+ @captured_comment_list = []
25
+ @captured_tailwind_config = ''
25
26
 
26
- @group = Group.new(**group.slice(:key, :type, :sub_keys))
27
- @source = Source.new(file: file[:absolute_file])
28
- @target = Target.new(
29
- folder: group[:folder],
30
- html_file: file[:target][:html_file],
31
- clean_html_file: file[:target][:clean_html_file],
32
- tailwind_config_file: file[:target][:tailwind_config_file],
33
- settings_file: file[:target][:settings_file],
34
- data_file: file[:target][:data_file],
35
- astro_file: file[:target][:astro_file]
36
- )
37
- end
38
- # rubocop:enable Metrics/AbcSize
39
-
40
- Group = Struct.new(:key, :type, :sub_keys, keyword_init: true)
41
- Source = Struct.new(:file, keyword_init: true) do
42
- def exist?
43
- File.exist?(file)
27
+ @group = Group.new(key: group.key, type: group.type, sub_keys: group.sub_keys)
28
+ @source = Source.new(file: file.absolute_file)
29
+ @target = Target.new(
30
+ folder: group.folder,
31
+ html_file: file.target.html_file,
32
+ clean_html_file: file.target.clean_html_file,
33
+ tailwind_config_file: file.target.tailwind_config_file,
34
+ settings_file: file.target.settings_file,
35
+ data_file: file.target.data_file,
36
+ astro_file: file.target.astro_file
37
+ )
44
38
  end
39
+ # rubocop:enable Metrics/AbcSize
40
+
41
+ Group = Struct.new(:key, :type, :sub_keys, keyword_init: true)
42
+ Source = Struct.new(:file, keyword_init: true) do
43
+ def exist?
44
+ File.exist?(file)
45
+ end
45
46
 
46
- def content
47
- @content ||= File.exist?(file) ? File.read(file) : ''
47
+ def content
48
+ @content ||= File.exist?(file) ? File.read(file) : ''
49
+ end
48
50
  end
51
+ Target = Struct.new(:folder, :html_file, :clean_html_file, :tailwind_config_file, :settings_file, :data_file, :astro_file, keyword_init: true)
49
52
  end
50
- Target = Struct.new(:folder, :html_file, :clean_html_file, :tailwind_config_file, :settings_file, :data_file, :astro_file, keyword_init: true)
51
53
  end
52
54
  end
53
55
  end
@@ -13,7 +13,7 @@ module TailwindDsl
13
13
  # you change the structure of the source input files. This is a destructive operation, so be warned.
14
14
  #
15
15
  # To execute this you need to pass reset_root_path: true
16
- class Transformer
16
+ class Generator
17
17
  COMMENT_REGEX = /<!--[\s\S]*?-->/.freeze
18
18
  BLANK_LINE_REGEX = /(\n\s*\n)+/.freeze
19
19
  TAILWIND_CONFIG_REGEX = /```(?<tailwind>\n[\s\S]+?)```/.freeze
@@ -34,8 +34,8 @@ module TailwindDsl
34
34
 
35
35
  delete_target_root_path if reset_root_path
36
36
 
37
- uikit.design_systems.each do |name, design_system|
38
- process_design_system(name, design_system)
37
+ uikit.design_systems.each do |design_system|
38
+ process_design_system(design_system)
39
39
  end
40
40
  end
41
41
 
@@ -49,15 +49,16 @@ module TailwindDsl
49
49
  FileUtils.rm_rf(Dir.glob("#{root_target_path}/*"))
50
50
  end
51
51
 
52
- def process_design_system(design_system_name, design_system)
53
- design_system[:groups].each do |group|
52
+ def process_design_system(design_system)
53
+ design_system_name = design_system.name
54
+ design_system.groups.each do |group|
54
55
  process_group(design_system_name, group)
55
56
  end
56
57
  end
57
58
 
58
59
  def process_group(design_system_name, group)
59
- group[:files].each do |file|
60
- # puts "DSN: #{design_system_name}, GRP: #{group[:type]}, FILE: #{file[:file]}"
60
+ group.files.each do |file|
61
+ # puts "DSN: #{design_system_name}, GRP: #{group.type}, FILE: #{file.file}"
61
62
  data = Data.new(design_system_name, group, file)
62
63
 
63
64
  unless data.source.exist?
@@ -26,7 +26,7 @@ module TailwindDsl
26
26
 
27
27
  def write(file)
28
28
  FileUtils.mkdir_p(File.dirname(file))
29
- File.write(file, JSON.pretty_generate(design_systems.to_h))
29
+ File.write(file, JSON.pretty_generate(uikit.to_h))
30
30
  end
31
31
  end
32
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindDsl
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
data/lib/tailwind_dsl.rb CHANGED
@@ -14,7 +14,7 @@ require_relative 'tailwind_dsl/etl/raw_components/schema/design_system'
14
14
  require_relative 'tailwind_dsl/etl/raw_components/schema/uikit'
15
15
 
16
16
  require_relative 'tailwind_dsl/etl/component_structures/data'
17
- require_relative 'tailwind_dsl/etl/component_structures/transformer'
17
+ require_relative 'tailwind_dsl/etl/component_structures/generator'
18
18
  # require_relative 'tailwind_dsl/astro_demo/generate_astro_page_data'
19
19
 
20
20
  module TailwindDsl
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "tailwind_dsl",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "tailwind_dsl",
9
- "version": "0.0.4",
9
+ "version": "0.0.5",
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": "tailwind_dsl",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Tailwind DSL will build tailwind websites useing Domain Specific Language conventions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwind_dsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -2200,7 +2200,7 @@ files:
2200
2200
  - lib/tailwind_dsl.rb
2201
2201
  - lib/tailwind_dsl/astro_demo/generate_astro_page_data.rb
2202
2202
  - lib/tailwind_dsl/etl/component_structures/data.rb
2203
- - lib/tailwind_dsl/etl/component_structures/transformer.rb
2203
+ - lib/tailwind_dsl/etl/component_structures/generator.rb
2204
2204
  - lib/tailwind_dsl/etl/raw_components/director.rb
2205
2205
  - lib/tailwind_dsl/etl/raw_components/schema/design_system.rb
2206
2206
  - lib/tailwind_dsl/etl/raw_components/schema/group.rb