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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e26927187a7803dca702605aa520d8c5fa588a674d1100fbe16d27dbfaa1dd3e
4
- data.tar.gz: 491ec56164e89fc1ec1c8c6e2d4690c2901fd39281c7dc920bb09cf14c1ba194
3
+ metadata.gz: f097a85055669dba2a0eaea384768916c0749056aed6b586d4cb99dd7b4d2115
4
+ data.tar.gz: 1edee00a6039c88408dca0c086571a724b6845ad95eab856f003226cb4e8e603
5
5
  SHA512:
6
- metadata.gz: 0fe84e3a162875f1d9252ec7ed3b6faaaaeb77ce2f8c19fd6d097d585c8ae3b9c339ee8f2d936e644b18385840cebca472a591b94f07ccbb01c5225b1dd059a0
7
- data.tar.gz: 134e56d178d62fcfd7ab5d1fd82d55120e6c6cca8dabf2bf4751d1fe750eb1bf4cb990ffa0ae311ab9aa837db411de13b58bcda6364b1db368cd5320d621f5ec
6
+ metadata.gz: d9a8ba95f76785e34d1435168ba9d8309c409d804f570eca1c90621a636b011cfb835bc9c675c531bcbbf0be2398448176a7b2104afb410d55472938930baf4a
7
+ data.tar.gz: 1ca7abdfb806614b04b9f35c773d19ccc6621acb27028101ea0f820c187c8b24fc5ac4646cf24dc690604c1f83688fe417c5386c21e674bb456d7d004f7beb08
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- birdel (1.1.0)
4
+ birdel (2.3.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/birdel/cli.rb CHANGED
@@ -1,14 +1,14 @@
1
- require 'thor'
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"
@@ -1,6 +1,7 @@
1
1
  module Birdel
2
2
  module Com
3
3
  def self.roll(component_ns)
4
+ p component_ns
4
5
  app_path = Pathname.new("#{Dir.pwd}")
5
6
  components_path = app_path.join("app", "components")
6
7
  component_ns_camelized = component_ns.split("::").map(&:camelize).join("::")
@@ -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
- { name: "index.css", content: "@import url(\"./components.css\");" },
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
- # entry_folder_path = Pathname.new(entry_folder)
18
- # entry_folder_index_path = Pathname.new("#{entry_folder}/components.css")
19
- entry_folder_index_path = entry_folder_path.join("components.css")
20
- puts "(css) Building #{entry_folder_index_path.relative_path_from(app_folder_path)}".yellow.bold
21
- # entry_folder_components_path = Pathname.new("#{entry_folder}/components.json")
22
- entry_folder_components_path = entry_folder_path.join("components.css.json")
23
- entry_folder_precomponents_path = entry_folder_path.join("precomponents.css.json")
24
- File.truncate(entry_folder_index_path, 0)
25
- file = File.open(entry_folder_index_path, "w")
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(entry_folder_precomponents_path))
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
- file.puts "@import url(\"#{file_path.relative_path_from(entry_folder_path).to_s}\");"
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(entry_folder_components_path))
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
- file.puts "@import url(\"#{full_component_path.relative_path_from(entry_folder_path).to_s}\");"
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 => #{entry_folder_components_path.relative_path_from(root_dir_path)}".red.bold
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Birdel
4
- VERSION = "2.3.0"
4
+ VERSION = "2.3.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birdel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhii