tailwind_dsl 0.0.14 → 0.0.15

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: c311546f3112011590192afd6386ca3e097366b4e32a7d4bdaf90eb2e50bb888
4
- data.tar.gz: c0720bf9fc432e6931772d819afebfb4e2fa2aa583bcfb36adf8fc18294f1538
3
+ metadata.gz: e6646b23144a973701ff3a0357cdf6eb27fcc34e26690d2fdbcd77abf1b4767b
4
+ data.tar.gz: 1930985fae4778a5d7576ba843f2f727c634c14802fa3c572d0513df5e2eb3f3
5
5
  SHA512:
6
- metadata.gz: 28c7d5f434fb96350a3bac05180d9e1efc58e3172efc5a9b36c6e14e93359e88c5c3f87ecb14177c7e5a02000f1001871e1b7d388f465572b743ed5b21f7f39c
7
- data.tar.gz: 96b446cb33fbb4a976d5187f205357df2439e2699cf37c9d3b886f1734efe3661823ba255923070197155d1eff68ba0335c0af577cccad2c212e27c36bb94ccf
6
+ metadata.gz: a6ccea6907b5a4a1ff3cdc20fa20d0ce6dc814890d1cc4524e2fba9b124b85d599c5ae1046de94ddf10b20bde5292ddf79cdd7f0d0c38d6fa117a0bf7bb73ee1
7
+ data.tar.gz: 8feb59692ddaf59ffe373c1492e08e45dfe546ab63bfc09554afe47322975ad0fb8de5ec91046bb506b0ad303543157a1c0e86c0c5098db85098d12d059ebfc5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [0.0.14](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.13...v0.0.14) (2022-10-18)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * refactor sample data directories ([23e4efb](https://github.com/klueless-io/tailwind_dsl/commit/23e4efb2863643cfbc8744e656a873900a421572))
7
+ * refactor sample data directories ([4017917](https://github.com/klueless-io/tailwind_dsl/commit/401791784e51fbe771c841294a4ad837f99c8ec9))
8
+ * start working on component model extractor ([929292d](https://github.com/klueless-io/tailwind_dsl/commit/929292dcdae8d79ccd12e2eae30d3e6710bac3f2))
9
+
1
10
  ## [0.0.13](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.12...v0.0.13) (2022-10-18)
2
11
 
3
12
 
@@ -5,13 +5,13 @@ module TailwindDsl
5
5
  module ComponentModels
6
6
  # Extract component models by reading the cleansed component HTML and then using GPT3 to infer both the data/model structure.
7
7
  class Extractor
8
- attr_reader :uikit
8
+ attr_reader :components
9
9
  attr_reader :target_root_path
10
10
  attr_reader :batch_size
11
11
  attr_reader :use_prompt
12
12
 
13
- def initialize(uikit, target_root_path, batch_size: 1, use_prompt: false, filter_design_system: nil)
14
- @uikit = uikit
13
+ def initialize(components, target_root_path, batch_size: 1, use_prompt: false, filter_design_system: nil)
14
+ @components = components
15
15
  @target_root_path = target_root_path
16
16
  @batch_size = batch_size
17
17
  @batch_left = batch_size
@@ -31,7 +31,7 @@ module TailwindDsl
31
31
  def extract; end
32
32
 
33
33
  # def components
34
- # @components ||= uikit.design_systems.map do |design_system|
34
+ # @components ||= components.design_systems.map do |design_system|
35
35
  # design_system.components.map do |component|
36
36
  # Component.new(design_system, component, source_root_path, target_root_path)
37
37
  # end
@@ -21,7 +21,9 @@ module TailwindDsl
21
21
  # .gsub(/(\n\s*\n)+/, "\n")
22
22
  attr_reader :uikit
23
23
  attr_reader :components
24
+ # Location for raw components
24
25
  attr_reader :source_root_path
26
+ # Location for component structures
25
27
  attr_reader :target_root_path
26
28
  attr_reader :reset_root_path
27
29
 
@@ -54,8 +56,8 @@ module TailwindDsl
54
56
 
55
57
  def query_components
56
58
  RawComponentQuery.query(uikit,
57
- raw_component_root_path: source_root_path,
58
- component_structure_root_path: target_root_path).records
59
+ source_root_path: source_root_path,
60
+ target_root_path: target_root_path).records
59
61
  end
60
62
 
61
63
  def process_components
@@ -8,8 +8,6 @@ module TailwindDsl
8
8
  # This is a two pass process:
9
9
  # 1. Query the raw component folder for all files that match the pattern and build up a graph with required information
10
10
  # 2. Flatten the graph into a list of rows
11
- #
12
- # If you need to debug, then pass in the debug flag and it will output the graph to the console
13
11
  class RawComponentQuery
14
12
  DesignSystem = Struct.new(
15
13
  :name,
@@ -64,22 +62,22 @@ module TailwindDsl
64
62
  end
65
63
 
66
64
  attr_reader :uikit
67
- attr_reader :raw_component_root_path
68
- attr_reader :component_structure_root_path
65
+ # Location for raw components
66
+ attr_reader :source_root_path
67
+ # Location for component structures
68
+ attr_reader :target_root_path
69
69
  attr_reader :current_design_system
70
- attr_reader :debug
71
70
  attr_reader :records
72
71
 
73
72
  def initialize(uikit, **args)
74
73
  @uikit = uikit
75
- @raw_component_root_path = args[:raw_component_root_path] || raise(ArgumentError, 'Missing raw_component_root_path')
76
- @component_structure_root_path = args[:component_structure_root_path] || raise(ArgumentError, 'Missing component_structure_root_path')
77
- @debug = args[:debug] || false
74
+ @source_root_path = args[:source_root_path] || raise(ArgumentError, 'Missing source_root_path')
75
+ @target_root_path = args[:target_root_path] || raise(ArgumentError, 'Missing target_root_path')
78
76
  end
79
77
 
80
78
  class << self
81
- def query(uikit, raw_component_root_path:, component_structure_root_path:, debug: false)
82
- instance = new(uikit, raw_component_root_path: raw_component_root_path, component_structure_root_path: component_structure_root_path, debug: debug)
79
+ def query(uikit, source_root_path:, target_root_path:)
80
+ instance = new(uikit, source_root_path: source_root_path, target_root_path: target_root_path)
83
81
  instance.call
84
82
  end
85
83
  end
@@ -119,11 +117,11 @@ module TailwindDsl
119
117
  end
120
118
 
121
119
  def source_path
122
- File.join(raw_component_root_path, design_system_name)
120
+ File.join(source_root_path, design_system_name)
123
121
  end
124
122
 
125
123
  def target_path
126
- File.join(component_structure_root_path, design_system_name)
124
+ File.join(target_root_path, design_system_name)
127
125
  end
128
126
 
129
127
  def map_design_system
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindDsl
4
- VERSION = '0.0.14'
4
+ VERSION = '0.0.15'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "tailwind_dsl",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "tailwind_dsl",
9
- "version": "0.0.14",
9
+ "version": "0.0.15",
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.14",
3
+ "version": "0.0.15",
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.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys