rubyjs-vite 1.1.1 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23880da75b113de83f2e2fffa6bba17718f324e536a5d49dfb2a4521a1a7ccdf
4
- data.tar.gz: b7564e09295463b135c0b64713e38c65bf27d71cc96f1b06248c3422011aa1f0
3
+ metadata.gz: 576fb17b237ee647e5d9f84e0ff5cbc365f79e982586ff2e8fa84830e66dbea3
4
+ data.tar.gz: 260eefacab7d61466718240bd85c3c3363b469e9b75966a2af746f3790e4f552
5
5
  SHA512:
6
- metadata.gz: 1094cf33f9ba36f5387c2911833019bdd9f2b80d88f8c2c546a71addfa1f114e31fc0a26798d716c57674488df800a9b34ebc4eedaa464ff38cd7a1d5cc04551
7
- data.tar.gz: 7b73a8adf15cf3efca76d0172bc0221a09bd20f8d7b7c0eb68c57e8fd9e18ee3cd02a655e7cc26808451527c639818219204edd4d71a221595be23e32bb14b39
6
+ metadata.gz: d1885cc6c4d236704619bb3493e47e831a1221c187f0cbf4b5c08ab031ef8c359466a54cf3a0b92ee909cc8c0509cfa01f080239929e26107a44a3fb499a891d
7
+ data.tar.gz: ba9cbe7ef7845fcaef87f8b2bf2b2a16f79733415b8fdf933715075b5a614acb046359b969a45941d63d0094ad4bb3304f6eaa66d43a83ff314da32a43115de9
data/app/arguments.rb CHANGED
@@ -7,7 +7,8 @@ require "option_parser"
7
7
  output: Dir.pwd,
8
8
  output_type: RubyJS::Constants::FILE_TYPE_O,
9
9
  source: Dir.pwd,
10
- eslevel: Config::get_eslevel
10
+ eslevel: Config::get_eslevel,
11
+ pid: nil,
11
12
  }
12
13
 
13
14
  OptionParser.parse do |parser|
@@ -55,6 +56,10 @@ OptionParser.parse do |parser|
55
56
 
56
57
  @options[:eslevel] = level.to_i
57
58
  end
59
+ parser.on("--pid PROCESS", "", "When the pid is set, the SIGUSR1\n" +
60
+ "signal is triggered." ) do |pid|
61
+ @options[:pid] = pid.to_i
62
+ end
58
63
  parser.on("--create PROJECT", nil, "Creates a new project using scaffolding." ) do |project|
59
64
  RubyJS::Scaffold.create project
60
65
  exit
data/app/main.rb CHANGED
@@ -38,7 +38,16 @@ if @options[:compile]
38
38
  end
39
39
 
40
40
  if @options[:watch]
41
+ h_sigusr = lambda do
42
+ pid = @options[:pid]
43
+ if pid
44
+ Process.kill("USR1", pid)
45
+ end
46
+ end
47
+
41
48
  puts RubyJS::Helper.event_p("message", "There is now a watch for edited files.")
49
+ h_sigusr.call()
50
+
42
51
  path_s = @options[:source]
43
52
 
44
53
  RubyJS::Helper.create_dir(path_s)
@@ -60,5 +69,7 @@ if @options[:watch]
60
69
  type_o: @options[:output_type],
61
70
  }
62
71
  end
72
+
73
+ h_sigusr.call()
63
74
  end
64
75
  end
@@ -25,7 +25,7 @@ module RubyJS
25
25
 
26
26
  def self.free path_fro
27
27
  # File
28
- File.delete(path_fro) if File.exists? path_fro
28
+ File.delete(path_fro) if File.exist? path_fro
29
29
  # Dir
30
30
  path_dro = File.dirname(path_fro)
31
31
  Dir.delete(path_dro) if Dir.empty? path_dro
@@ -1,3 +1,3 @@
1
1
  module RubyJS
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.3"
3
3
  end
data/lib/ruby_js.rb CHANGED
@@ -24,7 +24,8 @@ module RubyJS
24
24
 
25
25
  begin
26
26
  content_rb = Helper.open(path_f)
27
- content_js = Ruby2JS.convert(content_rb, eslevel: options[:eslevel]) unless content_rb.empty?
27
+ content_js = Ruby2JS.convert(content_rb, eslevel: options[:eslevel]
28
+ ) unless content_rb.empty?
28
29
 
29
30
  path_write = Helper.write(path_o, content_js)
30
31
  puts Helper.event_p("compiled", path_o)
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "project",
3
+ "ignore": [
4
+ "FILE_N_.*.rjs",
5
+ "test.rjs",
6
+ "main.rjs"
7
+ ]
8
+ }
@@ -0,0 +1,24 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ dist
12
+ dist-ssr
13
+ *.local
14
+
15
+ # Editor directories and files
16
+ .vscode/*
17
+ !.vscode/extensions.json
18
+ .idea
19
+ .DS_Store
20
+ *.suo
21
+ *.ntvs*
22
+ *.njsproj
23
+ *.sln
24
+ *.sw?
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.1.1
4
+ version: 1.1.3
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-05-05 00:00:00.000000000 Z
11
+ date: 2023-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2js
@@ -60,6 +60,8 @@ files:
60
60
  - lib/ruby_js/helper.rb
61
61
  - lib/ruby_js/scaffold.rb
62
62
  - lib/ruby_js/version.rb
63
+ - share/template/.codejoin
64
+ - share/template/.gitignore
63
65
  - share/template/bin/generate
64
66
  - share/template/bin/server
65
67
  - share/template/bin/watch