tailwind_dsl 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/lib/tailwind_dsl/etl/component_structures/data.rb +41 -39
- data/lib/tailwind_dsl/etl/component_structures/{transformer.rb → generator.rb} +8 -7
- data/lib/tailwind_dsl/etl/raw_components/director.rb +1 -1
- data/lib/tailwind_dsl/version.rb +1 -1
- data/lib/tailwind_dsl.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d70d1c6b80a54a13b64938342e2c3cf307e790ca874362c2eb6ab7ab3767f993
|
4
|
+
data.tar.gz: b4263d93baa86a44c06d82cc3b63657226b7641404e031820935972d24a830de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5033848253350e250c5ebd0d606b20512885fb27fc4e7a088bb81509b8ffb3dff93ccb75e1433b9fec0bfbb76ea3bb0b2ea3e2a2326f4544d6cdb7797781a9c
|
7
|
+
data.tar.gz: ce6f34ad77eb7c1f825cd7bb3047ce7f8bfec19ba86570abbc602c3c33cf04d083bf92246b99f1bfc4c729c35a5d3ae7cb150b6ab7748a3a6ff8cffe2d695f9e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
## [0.0.5](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.4...v0.0.5) (2022-10-12)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add support for generating component structures ([555f188](https://github.com/klueless-io/tailwind_dsl/commit/555f1880b104897e26d89518e1ac7263ff7be978))
|
7
|
+
|
8
|
+
## [0.0.4](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.3...v0.0.4) (2022-10-12)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* after transforemer to etl rename ([66428fe](https://github.com/klueless-io/tailwind_dsl/commit/66428fe3ff3a91ce80a57592877538b8b098c976))
|
14
|
+
* before transforemer to etl rename ([7e06c9d](https://github.com/klueless-io/tailwind_dsl/commit/7e06c9da343ea997e731dd2efc344ab77b490786))
|
15
|
+
* cops ([6cde6f4](https://github.com/klueless-io/tailwind_dsl/commit/6cde6f4c4a0729bca58a9b5ff4bcfa8c9d66b5ae))
|
16
|
+
* quick test of rubocop in GTA ([74e0332](https://github.com/klueless-io/tailwind_dsl/commit/74e0332392ecd131a86387de0b8eeb8db53e3b75))
|
17
|
+
* quick test of rubocop in GTA ([ab5fac5](https://github.com/klueless-io/tailwind_dsl/commit/ab5fac53f14cb36c527e90036d5490334b1d0f2a))
|
18
|
+
* update domain model documentation ([4d41237](https://github.com/klueless-io/tailwind_dsl/commit/4d412374797fb503af630d0f6f3263f3a9470c85))
|
19
|
+
* update domain model documentation ([3c0b5b7](https://github.com/klueless-io/tailwind_dsl/commit/3c0b5b72c3dde21de7b371a3c4a3c7575c08753d))
|
20
|
+
* update domain model documentation ([065e84e](https://github.com/klueless-io/tailwind_dsl/commit/065e84e545b190f15cf2e115c8b4084544b092a0))
|
21
|
+
* update domain model documentation ([5a041cb](https://github.com/klueless-io/tailwind_dsl/commit/5a041cb648e62baa71e787b359c87e6b327edb1d))
|
22
|
+
* update domain model documentation ([31836df](https://github.com/klueless-io/tailwind_dsl/commit/31836df17a03cf13376352243c1b2edc44ce09eb))
|
23
|
+
* update domain model documentation ([cb2afd5](https://github.com/klueless-io/tailwind_dsl/commit/cb2afd5a1ddd32fa72f4ee976c02a785de894010))
|
24
|
+
* update domain model documentation ([4c45860](https://github.com/klueless-io/tailwind_dsl/commit/4c45860191e2ced0cde46569df6d106d4157a46a))
|
25
|
+
* update gem dependancies ([d44c499](https://github.com/klueless-io/tailwind_dsl/commit/d44c4998907e4ba22e51e5c6ca32923f623d994c))
|
26
|
+
* update gemspec ([d4428c4](https://github.com/klueless-io/tailwind_dsl/commit/d4428c46247d0ca02390709b545418cf3c224c79))
|
27
|
+
|
1
28
|
## [0.0.3](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.2...v0.0.3) (2022-04-04)
|
2
29
|
|
3
30
|
|
@@ -1,53 +1,55 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module TailwindDsl
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
19
|
+
# rubocop:disable Metrics/AbcSize
|
20
|
+
def initialize(design_system_name, group, file)
|
21
|
+
@design_system_name = design_system_name
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
23
|
+
@captured_comment_text = ''
|
24
|
+
@captured_comment_list = []
|
25
|
+
@captured_tailwind_config = ''
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
|
-
|
47
|
-
|
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
|
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 |
|
38
|
-
process_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(
|
53
|
-
design_system
|
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
|
60
|
-
# puts "DSN: #{design_system_name}, GRP: #{group
|
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?
|
data/lib/tailwind_dsl/version.rb
CHANGED
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/
|
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.
|
3
|
+
"version": "0.0.6",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "tailwind_dsl",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.6",
|
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
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
|
+
version: 0.0.6
|
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/
|
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
|