rubyjs-vite 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/arguments.rb +6 -1
- data/app/main.rb +11 -0
- data/lib/ruby_js/helper.rb +1 -1
- data/lib/ruby_js/version.rb +1 -1
- data/lib/ruby_js.rb +2 -1
- data/share/template/.codejoin +8 -0
- data/share/template/.gitignore +24 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32802ca4b76727a9cd52de549aa8ee048005144e6ae8350b797ebff0766a8701
|
4
|
+
data.tar.gz: 0a3a8f3f6d257eaff408611b97dd68b42524299bef41a6d5f7d1a18622688e21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81233b61831343a8aa32e6378ebbf0f4a0e037886a604c658825fea082747549bac583dd00bb1805c01c62c735ee9f4c4598d0fb6f9510700c9ac117e933a634
|
7
|
+
data.tar.gz: d4a594a45001d29114f26f1df0f9ba78df3e38fb04435cb4846c71f2f4ff851d3607cc534d6ff3f5e490984d834c7d1277a7a9a46c3e37f583850ee0e41ed055
|
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
|
data/lib/ruby_js/helper.rb
CHANGED
data/lib/ruby_js/version.rb
CHANGED
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]
|
27
|
+
content_js = Ruby2JS.convert(content_rb, eslevel: options[:eslevel],
|
28
|
+
filters: [:camelCase]) 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,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.
|
4
|
+
version: 1.1.2
|
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-
|
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
|