tailwind_dsl 0.0.18 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.builders/generators/domain-model.rb +1 -0
- data/CHANGELOG.md +16 -0
- data/lib/tailwind_dsl/etl/component_structures/generator.rb +18 -18
- data/lib/tailwind_dsl/etl/component_structures/raw_component_query.rb +15 -2
- data/lib/tailwind_dsl/etl/raw_components/{director.rb → load.rb} +3 -3
- data/lib/tailwind_dsl/etl/raw_components/schema/target_file.rb +3 -0
- data/lib/tailwind_dsl/etl/raw_components/transformer.rb +1 -0
- 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 +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59f2ab634f3b594b52b4c320dd148ad583f9bc9f3b7b9fecefc930b5997d4dca
|
4
|
+
data.tar.gz: 149b69e1c9c976f29d87e4d6f333a6649df648bb8cd43979bd8ac327119ea019
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80de90f95be1c3a185718e37e1d81d06bd895f12af0c434e6f4a08c5ce45ad292653986d9d435bc73880e3293d33ecdfd0433b5cbf3ca6a4594a1b15152f22b3
|
7
|
+
data.tar.gz: 6cb6df996df398e6651c365b99e5c401ff4ab300d68bc26477a186f20a519b245fd8df41bfeea22ca437aac36ed1d6330d236982489ecec783ee92a3c103f252
|
@@ -216,6 +216,7 @@ KManager.action :domain_model do
|
|
216
216
|
.field(:tailwind_config_file , type: :string)
|
217
217
|
.field(:settings_file , type: :string)
|
218
218
|
.field(:data_file , type: :string)
|
219
|
+
.field(:model_file , type: :string)
|
219
220
|
.field(:astro_file , type: :string)
|
220
221
|
end
|
221
222
|
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## [0.0.19](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.18...v0.0.19) (2022-10-21)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* update file locations ([db95e15](https://github.com/klueless-io/tailwind_dsl/commit/db95e15dd7d08f765113ca4f6c9a00eda3cfc661))
|
7
|
+
|
8
|
+
## [0.0.18](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.17...v0.0.18) (2022-10-20)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* minor refactor on long extensions ([70615ad](https://github.com/klueless-io/tailwind_dsl/commit/70615adc3bb37267e930ac36b92472f8b054f2d7))
|
14
|
+
* resetting root path will remove transient files and empty directories, but not custom files ([07ef5ae](https://github.com/klueless-io/tailwind_dsl/commit/07ef5ae71fda4a92b9a9312f3f4de2bca7151505))
|
15
|
+
* resetting root path will remove transient files and empty directories, but not custom files ([e546bed](https://github.com/klueless-io/tailwind_dsl/commit/e546bed751f4e996802340a6573b68663224d555))
|
16
|
+
|
1
17
|
## [0.0.17](https://github.com/klueless-io/tailwind_dsl/compare/v0.0.16...v0.0.17) (2022-10-19)
|
2
18
|
|
3
19
|
|
@@ -51,24 +51,6 @@ module TailwindDsl
|
|
51
51
|
raise 'Target path does not exist' unless Dir.exist?(target_root_path)
|
52
52
|
end
|
53
53
|
|
54
|
-
def clear_root_path
|
55
|
-
Dir.glob("#{target_root_path}/**/*")
|
56
|
-
.select { |path| transient_file?(path) }
|
57
|
-
.each { |path| File.delete(path) }
|
58
|
-
|
59
|
-
Dir.glob("#{target_root_path}/**/")
|
60
|
-
.reverse_each { |d| Dir.rmdir d if Dir.entries(d).size == 2 }
|
61
|
-
end
|
62
|
-
|
63
|
-
def transient_file?(path)
|
64
|
-
return false if File.directory?(path)
|
65
|
-
|
66
|
-
ext = File.basename(path).split('.', 2)[1]
|
67
|
-
ext = ext.nil? ? '' : ".#{ext}"
|
68
|
-
|
69
|
-
TRANSIENT_FILE_EXTENSIONS.include?(ext)
|
70
|
-
end
|
71
|
-
|
72
54
|
def query_components
|
73
55
|
RawComponentQuery.query(uikit,
|
74
56
|
source_root_path: source_root_path,
|
@@ -216,6 +198,24 @@ module TailwindDsl
|
|
216
198
|
}
|
217
199
|
}
|
218
200
|
end
|
201
|
+
|
202
|
+
def clear_root_path
|
203
|
+
Dir.glob("#{target_root_path}/**/*")
|
204
|
+
.select { |path| transient_file?(path) }
|
205
|
+
.each { |path| File.delete(path) }
|
206
|
+
|
207
|
+
Dir.glob("#{target_root_path}/**/")
|
208
|
+
.reverse_each { |d| Dir.rmdir d if Dir.entries(d).size == 2 }
|
209
|
+
end
|
210
|
+
|
211
|
+
def transient_file?(path)
|
212
|
+
return false if File.directory?(path)
|
213
|
+
|
214
|
+
ext = File.basename(path).split('.', 2)[1]
|
215
|
+
ext = ext.nil? ? '' : ".#{ext}"
|
216
|
+
|
217
|
+
TRANSIENT_FILE_EXTENSIONS.include?(ext)
|
218
|
+
end
|
219
219
|
end
|
220
220
|
end
|
221
221
|
end
|
@@ -29,8 +29,18 @@ module TailwindDsl
|
|
29
29
|
puts format('%-30<key>s : %<value>s', key: 'Group folder', value: folder)
|
30
30
|
end
|
31
31
|
end
|
32
|
-
|
33
|
-
|
32
|
+
|
33
|
+
FilePath = Struct.new(
|
34
|
+
:source_file,
|
35
|
+
:target_html_file,
|
36
|
+
:target_clean_html_file,
|
37
|
+
:target_tailwind_config_file,
|
38
|
+
:target_settings_file,
|
39
|
+
:target_data_file,
|
40
|
+
:target_model_file,
|
41
|
+
:target_astro_file,
|
42
|
+
keyword_init: true
|
43
|
+
) do
|
34
44
|
# rubocop:disable Metrics/AbcSize
|
35
45
|
def debug
|
36
46
|
puts format('%-30<key>s : %<value>s', key: 'Source file', value: source_file)
|
@@ -39,6 +49,7 @@ module TailwindDsl
|
|
39
49
|
puts format('%-30<key>s : %<value>s', key: 'Target tailwind config file', value: target_tailwind_config_file)
|
40
50
|
puts format('%-30<key>s : %<value>s', key: 'Target settings file', value: target_settings_file)
|
41
51
|
puts format('%-30<key>s : %<value>s', key: 'Target data file', value: target_data_file)
|
52
|
+
puts format('%-30<key>s : %<value>s', key: 'Target model file', value: target_model_file)
|
42
53
|
puts format('%-30<key>s : %<value>s', key: 'Target astro file', value: target_astro_file)
|
43
54
|
end
|
44
55
|
# rubocop:enable Metrics/AbcSize
|
@@ -176,6 +187,7 @@ module TailwindDsl
|
|
176
187
|
target_tailwind_config_file: file.target.tailwind_config_file,
|
177
188
|
target_settings_file: file.target.settings_file,
|
178
189
|
target_data_file: file.target.data_file,
|
190
|
+
target_model_file: file.target.model_file,
|
179
191
|
target_astro_file: file.target.astro_file
|
180
192
|
}
|
181
193
|
end
|
@@ -189,6 +201,7 @@ module TailwindDsl
|
|
189
201
|
target_tailwind_config_file: File.join(target_path, file.target.tailwind_config_file),
|
190
202
|
target_settings_file: File.join(target_path, file.target.settings_file),
|
191
203
|
target_data_file: File.join(target_path, file.target.data_file),
|
204
|
+
target_model_file: File.join(target_path, file.target.model_file),
|
192
205
|
target_astro_file: File.join(target_path, file.target.astro_file)
|
193
206
|
}
|
194
207
|
end
|
@@ -3,15 +3,15 @@
|
|
3
3
|
module TailwindDsl
|
4
4
|
module Etl
|
5
5
|
module RawComponents
|
6
|
-
# NOTE:
|
6
|
+
# NOTE: Load is badly named.
|
7
7
|
|
8
|
-
# Use the
|
8
|
+
# Use the Load to build the UiKit which will store the JSON representations of each Design System plus components.
|
9
9
|
#
|
10
10
|
# This is a raw representation of the source.
|
11
11
|
#
|
12
12
|
# This data structure will be used by the component transformer to build
|
13
13
|
# auxiliary data structures for components such as clean HTML, Astro, data shapes.
|
14
|
-
class
|
14
|
+
class Load
|
15
15
|
attr_reader :uikit
|
16
16
|
|
17
17
|
def initialize
|
@@ -12,6 +12,7 @@ module TailwindDsl
|
|
12
12
|
attr_accessor :tailwind_config_file
|
13
13
|
attr_accessor :settings_file
|
14
14
|
attr_accessor :data_file
|
15
|
+
attr_accessor :model_file
|
15
16
|
attr_accessor :astro_file
|
16
17
|
|
17
18
|
def initialize(**args)
|
@@ -20,6 +21,7 @@ module TailwindDsl
|
|
20
21
|
@tailwind_config_file = grab_arg(args, :tailwind_config_file, guard: 'Missing tailwind_config_file')
|
21
22
|
@settings_file = grab_arg(args, :settings_file, guard: 'Missing settings_file')
|
22
23
|
@data_file = grab_arg(args, :data_file, guard: 'Missing data_file')
|
24
|
+
@model_file = grab_arg(args, :model_file) # , guard: 'Missing model_file')
|
23
25
|
@astro_file = grab_arg(args, :astro_file, guard: 'Missing astro_file')
|
24
26
|
end
|
25
27
|
|
@@ -30,6 +32,7 @@ module TailwindDsl
|
|
30
32
|
tailwind_config_file: tailwind_config_file,
|
31
33
|
settings_file: settings_file,
|
32
34
|
data_file: data_file,
|
35
|
+
model_file: model_file,
|
33
36
|
astro_file: astro_file
|
34
37
|
}
|
35
38
|
end
|
data/lib/tailwind_dsl/version.rb
CHANGED
data/lib/tailwind_dsl.rb
CHANGED
@@ -5,7 +5,7 @@ require 'cmdlet'
|
|
5
5
|
require_relative 'tailwind_dsl/version'
|
6
6
|
# require_relative '_'
|
7
7
|
|
8
|
-
require_relative 'tailwind_dsl/etl/raw_components/
|
8
|
+
require_relative 'tailwind_dsl/etl/raw_components/load'
|
9
9
|
require_relative 'tailwind_dsl/etl/raw_components/transformer'
|
10
10
|
|
11
11
|
require_relative 'tailwind_dsl/etl/element'
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "tailwind_dsl",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.20",
|
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.20",
|
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,14 +1,14 @@
|
|
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.20
|
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-10-
|
11
|
+
date: 2022-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cmdlet
|
@@ -2155,7 +2155,7 @@ files:
|
|
2155
2155
|
- lib/tailwind_dsl/etl/component_structures/generator.rb
|
2156
2156
|
- lib/tailwind_dsl/etl/component_structures/raw_component_query.rb
|
2157
2157
|
- lib/tailwind_dsl/etl/element.rb
|
2158
|
-
- lib/tailwind_dsl/etl/raw_components/
|
2158
|
+
- lib/tailwind_dsl/etl/raw_components/load.rb
|
2159
2159
|
- lib/tailwind_dsl/etl/raw_components/schema/design_system.rb
|
2160
2160
|
- lib/tailwind_dsl/etl/raw_components/schema/group.rb
|
2161
2161
|
- lib/tailwind_dsl/etl/raw_components/schema/source_file.rb
|