birdel 2.3.0 → 2.3.4
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/birdel/cli.rb +5 -5
- data/lib/birdel/com/com_actor.rb +1 -0
- data/lib/birdel/map/map_actor.rb +7 -1
- data/lib/birdel/synth/synth_actor.rb +20 -36
- data/lib/birdel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f097a85055669dba2a0eaea384768916c0749056aed6b586d4cb99dd7b4d2115
|
|
4
|
+
data.tar.gz: 1edee00a6039c88408dca0c086571a724b6845ad95eab856f003226cb4e8e603
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d9a8ba95f76785e34d1435168ba9d8309c409d804f570eca1c90621a636b011cfb835bc9c675c531bcbbf0be2398448176a7b2104afb410d55472938930baf4a
|
|
7
|
+
data.tar.gz: 1ca7abdfb806614b04b9f35c773d19ccc6621acb27028101ea0f820c187c8b24fc5ac4646cf24dc690604c1f83688fe417c5386c21e674bb456d7d004f7beb08
|
data/Gemfile.lock
CHANGED
data/lib/birdel/cli.rb
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
require '
|
|
2
|
-
require_relative "synth/synth_actor"
|
|
3
|
-
require_relative "com/com_actor"
|
|
4
|
-
require_relative "map/map_actor"
|
|
5
|
-
require_relative "component/component_actor"
|
|
1
|
+
require 'birdel'
|
|
6
2
|
|
|
7
3
|
module Birdel
|
|
8
4
|
class CLI
|
|
9
5
|
def self.start(args)
|
|
6
|
+
p args
|
|
10
7
|
method_name = args[0]
|
|
11
8
|
method_param = args[1]
|
|
9
|
+
p method_name
|
|
10
|
+
p method_param
|
|
11
|
+
p "--"
|
|
12
12
|
if method_name == "synth"
|
|
13
13
|
Birdel::Synth.roll
|
|
14
14
|
elsif method_name == "gcom"
|
data/lib/birdel/com/com_actor.rb
CHANGED
data/lib/birdel/map/map_actor.rb
CHANGED
|
@@ -27,7 +27,13 @@ module Birdel
|
|
|
27
27
|
{ name: "components.css.json", content: "[]" },
|
|
28
28
|
{ name: "precomponents.css", content: "" },
|
|
29
29
|
{ name: "precomponents.css.json", content: "[]" },
|
|
30
|
-
|
|
30
|
+
{
|
|
31
|
+
name: "index.css",
|
|
32
|
+
content: "
|
|
33
|
+
@import url(\"./precomponents.css\");
|
|
34
|
+
@import url(\"./components.css\");
|
|
35
|
+
"
|
|
36
|
+
},
|
|
31
37
|
]
|
|
32
38
|
css_entry_files.each do |file|
|
|
33
39
|
if full_css_entry_path.join(file[:name]).exist?
|
|
@@ -10,67 +10,56 @@ module Birdel
|
|
|
10
10
|
js_application_file_path = js_folder_path.join("ui/application.js")
|
|
11
11
|
css_bentries_path = stylesheets_folder_path.join("ui/bentries")
|
|
12
12
|
js_bentries_path = js_folder_path.join("ui/bentries")
|
|
13
|
-
|
|
14
|
-
css_entries_error = false
|
|
15
|
-
js_entries_error = false
|
|
13
|
+
|
|
16
14
|
css_bentries_path.each_child do |entry_folder_path|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
File.
|
|
25
|
-
|
|
15
|
+
precomponents_css = entry_folder_path.join("precomponents.css")
|
|
16
|
+
components_css = entry_folder_path.join("components.css")
|
|
17
|
+
File.truncate(precomponents_css, 0)
|
|
18
|
+
File.truncate(components_css, 0)
|
|
19
|
+
|
|
20
|
+
puts "(css) Building #{precomponents_css.relative_path_from(app_folder_path)}".yellow.bold
|
|
21
|
+
precomponents_css_file = File.open(precomponents_css, "w")
|
|
22
|
+
components_css_file = File.open(components_css, "w")
|
|
23
|
+
|
|
24
|
+
components_json = entry_folder_path.join("components.css.json")
|
|
25
|
+
precomponents_json = entry_folder_path.join("precomponents.css.json")
|
|
26
26
|
|
|
27
27
|
#precomponents
|
|
28
28
|
puts "-> Precomponents...".yellow
|
|
29
|
-
precomponents = JSON.parse(File.read(
|
|
29
|
+
precomponents = JSON.parse(File.read(precomponents_json))
|
|
30
30
|
precomponents.each do |precomponent_path_string|
|
|
31
|
-
# # file_path = Pathname.new("#{stylesheets_folder_path.to_s}/#{precomponent_path_string}.css")
|
|
32
31
|
file_path = stylesheets_folder_path.join("#{precomponent_path_string}.css")
|
|
33
32
|
if file_path.exist?
|
|
34
33
|
puts "+ #{precomponent_path_string.split("/").last}.css".green
|
|
35
|
-
|
|
34
|
+
precomponents_css_file.puts "@import url(\"#{file_path.relative_path_from(entry_folder_path).to_s}\");"
|
|
36
35
|
else
|
|
37
|
-
css_entries_error = true
|
|
38
36
|
puts "File not found: #{file_path}".red
|
|
37
|
+
exit
|
|
39
38
|
end
|
|
40
39
|
end
|
|
41
40
|
|
|
42
|
-
file.puts ""
|
|
43
|
-
|
|
44
41
|
#components
|
|
45
42
|
puts "-> Components...".yellow
|
|
46
|
-
components = JSON.parse(File.read(
|
|
43
|
+
components = JSON.parse(File.read(components_json))
|
|
47
44
|
components.each do |component_path_string|
|
|
48
|
-
# full_component_path = Pathname.new("#{components_folder_path.to_s}/#{component_path_string}.css")
|
|
49
45
|
full_component_path = components_folder_path.join("#{component_path_string}.css")
|
|
50
46
|
if full_component_path.exist?
|
|
51
47
|
file_name = component_path_string.split("/").last
|
|
52
48
|
puts "+ #{file_name}.css".green
|
|
53
|
-
|
|
49
|
+
components_css.puts "@import url(\"#{full_component_path.relative_path_from(entry_folder_path).to_s}\");"
|
|
54
50
|
else
|
|
55
|
-
css_entries_error = true
|
|
56
51
|
puts "Component not found: #{component_path_string}".red
|
|
57
|
-
puts "Check => #{
|
|
52
|
+
puts "Check => #{components_json.relative_path_from(root_dir_path)}".red.bold
|
|
53
|
+
exit
|
|
58
54
|
end
|
|
59
55
|
end
|
|
60
56
|
end
|
|
61
|
-
if css_entries_error
|
|
62
|
-
puts "(css-error) Building failed.".red
|
|
63
|
-
exit
|
|
64
|
-
end
|
|
65
57
|
puts "(css-success) Building finished.".green
|
|
66
58
|
puts ""
|
|
67
59
|
|
|
68
60
|
js_bentries_path.each_child do |entry_folder_path|
|
|
69
|
-
# js_entries.each do |entry|
|
|
70
|
-
# index_path = Pathname.new("#{entry}/components.js")
|
|
71
61
|
index_path = entry_folder_path.join("components.js")
|
|
72
62
|
components_json_path = entry_folder_path.join("components.js.json")
|
|
73
|
-
# entry_folder_path = Pathname.new(entry)
|
|
74
63
|
puts "(js) Building #{index_path.relative_path_from(app_folder_path)}".green
|
|
75
64
|
puts "-> (js) Components...".yellow
|
|
76
65
|
File.truncate(index_path, 0)
|
|
@@ -83,7 +72,6 @@ module Birdel
|
|
|
83
72
|
path_parts = component_path.split("/")
|
|
84
73
|
component_name = path_parts.pop
|
|
85
74
|
controller_from_components = "#{component_path}/#{component_name}_controller"
|
|
86
|
-
# component_controller_path = Pathname.new("#{components_folder_path.to_s}/#{controller_from_components}.js")
|
|
87
75
|
component_controller_path = components_folder_path.join("#{controller_from_components}.js")
|
|
88
76
|
if component_controller_path.exist?
|
|
89
77
|
component_path_dashed = component_path.tr("_", "-").gsub("/", "--")
|
|
@@ -95,15 +83,11 @@ module Birdel
|
|
|
95
83
|
file.puts ""
|
|
96
84
|
puts "+ #{component_path_dashed}"
|
|
97
85
|
else
|
|
98
|
-
js_entries_error = true
|
|
99
86
|
puts "Stimulus controller not found: #{component_path}".red
|
|
87
|
+
exit
|
|
100
88
|
end
|
|
101
89
|
end
|
|
102
90
|
end
|
|
103
|
-
if js_entries_error
|
|
104
|
-
puts "(js-error) Building failed.".red
|
|
105
|
-
exit
|
|
106
|
-
end
|
|
107
91
|
puts "(js-success) Building finished.".green
|
|
108
92
|
end
|
|
109
93
|
end
|
data/lib/birdel/version.rb
CHANGED