rubyjs-vite 1.0.8 → 1.1.0

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: e74e719ed6b734bda5a6a351f5dd2c6ae7c88b9b6b8454504e52ec3344162c08
4
- data.tar.gz: 8c5b53516bd6d61ad97373e87148353c70c11cb68d2923baf9c671ad358acde6
3
+ metadata.gz: dc37ed24ae1f1bfbdaf4300b70079b7e493f45322236d354300a3ce7357cff8d
4
+ data.tar.gz: b63b927b8d7248533ec2672f14ce120ad64dedf9d54cfb142422f96ea5ae7923
5
5
  SHA512:
6
- metadata.gz: d090f6c832663cb4f268eb866b9a4c1e4990f0abf96eb44e8d711da35e2c3ab16f21878e6947fa8e93fae45003040a8c691c8630c2c952b835d22f10c714a9b4
7
- data.tar.gz: 927824b334eb77253a20cc58c34b2a21b9be5dc5082248efbe0a8bb02d1f74fe563d316717df902fe3a79a35834e854bfbe980882c16867f36f8e7be637aa54f
6
+ metadata.gz: 5e4952c7c7bbe8ed80341003967ae70f25672a09db5a0f864c565446750611fedbd0f90146a9117e698b6b4f1c305f7b436d2a39f98e1822ed8f388ef44e53bf
7
+ data.tar.gz: 1e03c761e1bb377a2e4c07278fbeaf4a5cbae779b61e1afd54407394fe13c5227a5c4bddf3c1a032ff48b800275d8ebe4c487a43954c2880702c90148967975e
data/app/main.rb CHANGED
@@ -56,7 +56,8 @@ if @options[:watch]
56
56
  unless removed.empty?
57
57
  RubyJS.free removed.last, {
58
58
  path_s: @options[:source],
59
- path_o: @options[:output]
59
+ path_o: @options[:output],
60
+ type_o: @options[:output_type],
60
61
  }
61
62
  end
62
63
  end
@@ -7,7 +7,15 @@ module RubyJS
7
7
  path_ao = File.join(Dir.pwd, project)
8
8
 
9
9
  puts "Scaffolding project in #{path_ao}..."
10
- FileUtils.cp_r path_as, path_ao
10
+ unless Dir.exist? path_ao
11
+ FileUtils.cp_r(path_as, path_ao)
12
+ else
13
+ files = Dir.glob("#{path_as}/**/*")
14
+ files.each do |pas|
15
+ pao = pas.sub(path_as, path_ao)
16
+ FileUtils.cp_r(pas, pao)
17
+ end
18
+ end
11
19
 
12
20
  json_oc = JsonParser.new File.join(path_ao, "package.json")
13
21
  json_oc.parse :name, project.downcase
@@ -20,7 +28,7 @@ module RubyJS
20
28
  end
21
29
 
22
30
  def self.change_name_f path_ao
23
- paths_bin_ao = ["#{path_ao}/bin/watch", "#{path_ao}/bin/generate"]
31
+ paths_bin_ao = Dir.glob("#{path_ao}/bin/*")
24
32
  paths_bin_ao.each do |p|
25
33
  content = Helper.open(p)
26
34
  content_ch = content.sub("APP_NAME", Constants::APP_NAME)
@@ -1,3 +1,3 @@
1
1
  module RubyJS
2
- VERSION = "1.0.8"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/ruby_js.rb CHANGED
@@ -60,7 +60,7 @@ module RubyJS
60
60
  end
61
61
 
62
62
  def self.free path_f, options
63
- path_o = Helper.absolute_path path_f, options
63
+ path_o = Helper.absolute_path path_f, options, options[:type_o]
64
64
  Helper.free path_o
65
65
 
66
66
  puts Helper.event_p("deleted", path_o)
@@ -1,4 +1,7 @@
1
1
  #!/bin/bash
2
2
 
3
- . $(pwd)/bin/watch &
3
+ APP_NAME -c -w -s src/rjs -o src/.js &
4
4
  npm run dev
5
+
6
+ trap - SIGINT
7
+ kill $!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyjs-vite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filip Vrba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2js
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  requirements: []
91
- rubygems_version: 3.3.7
91
+ rubygems_version: 3.4.10
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Converts the syntax of ruby into javascript.