rubyjs-vite 1.0.0 → 1.0.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 +1 -1
- data/app/config.rb +11 -0
- data/app/main.rb +1 -0
- data/lib/description.rb +10 -0
- data/lib/ruby_js/scaffold.rb +16 -5
- data/lib/ruby_js/version.rb +1 -1
- data/share/template/bin/server +1 -1
- data/share/template/bin/watch +3 -0
- metadata +41 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d8be56a5cd62d9c0cc4751a44ea778fbee3dabead90381f28e3d8664c2266f3
|
4
|
+
data.tar.gz: d4af48e85e48a5deef17f59620e9a558930b463fc5b33338daeb04cdde15d5ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad86cf0733735f3cd6290881c9dff9b247459035801e46b82f8d1660f6bdb59c13a8b83b1027c6f14ee0358b8b9825dca646ee93cfe24c333100ab8f2a3f1de0
|
7
|
+
data.tar.gz: 63c92ff729d76d0ea5d55df1712e4731f06c944ecedd58e9723e71f1f26b7cccc00289932a87b2e8a1b0cd50fd16b67a45b0d1be3cc17e47784b4674d13afa48
|
data/app/arguments.rb
CHANGED
data/app/config.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
module Config
|
2
|
+
module_function
|
3
|
+
|
4
|
+
@default = JsonParser.new File.join(ROOT, 'config/default.json')
|
5
|
+
# If eslevel doesn't already exist, the default value is used to initialize it.
|
6
|
+
@default.on :eslevel, "2021"
|
7
|
+
|
8
|
+
def get_eslevel
|
9
|
+
@default.parse(:eslevel).to_i
|
10
|
+
end
|
11
|
+
end
|
data/app/main.rb
CHANGED
data/lib/description.rb
ADDED
data/lib/ruby_js/scaffold.rb
CHANGED
@@ -12,20 +12,31 @@ module RubyJS
|
|
12
12
|
json_oc = JsonParser.new File.join(path_ao, "package.json")
|
13
13
|
json_oc.parse :name, project.downcase
|
14
14
|
|
15
|
-
|
15
|
+
change_watch_f(path_ao)
|
16
16
|
install_vite(project, path_ao)
|
17
17
|
end
|
18
18
|
|
19
|
-
def self.
|
20
|
-
path_bin_ao = "#{path_ao}/bin/
|
19
|
+
def self.change_watch_f path_ao
|
20
|
+
path_bin_ao = "#{path_ao}/bin/watch"
|
21
21
|
content = Helper.open(path_bin_ao)
|
22
22
|
content_ch = content.sub("APP_NAME", Constants::APP_NAME)
|
23
23
|
Helper.write(path_bin_ao, content_ch)
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.install_vite project, path_ao
|
27
|
-
|
28
|
-
|
27
|
+
is_done = system("cd #{path_ao} && npm install -D vite")
|
28
|
+
if is_done
|
29
|
+
puts "\nDone. Now run:\n\n cd #{project}\n bin/server\n\n"
|
30
|
+
else
|
31
|
+
wspaces = ' '*2
|
32
|
+
puts "\nThe Vite library installation encountered an issue.\n" +
|
33
|
+
"NodeJS is probably not installed on your machine.\n" +
|
34
|
+
"Please rerun the Vite installation after installing NodeJS.\n" +
|
35
|
+
"Use these instructions:\n\n" +
|
36
|
+
"#{wspaces}cd #{project}\n" +
|
37
|
+
"#{wspaces}npm install -D vite\n" +
|
38
|
+
"#{wspaces}bin/server"
|
39
|
+
end
|
29
40
|
end
|
30
41
|
end
|
31
42
|
end
|
data/lib/ruby_js/version.rb
CHANGED
data/share/template/bin/server
CHANGED
metadata
CHANGED
@@ -1,16 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyjs-vite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.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: 2022-11-
|
12
|
-
dependencies:
|
13
|
-
|
11
|
+
date: 2022-11-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ruby2js
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: listen
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.7'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.7'
|
41
|
+
description: |-
|
42
|
+
Web applications may be made with the help of RubyJS Vite. The programmer can avoid using JS syntax, which is helpful. Everything is done automatically; all you have to do is start the server and build a project using scaffolding.
|
43
|
+
|
44
|
+
Write your code using the JS api and Ruby syntax, and the server will automatically translate it. It then stores it in a file with the extension ".js". You will then be able to publish the project to [Vercel](https://vercel.com/) or directly to the [NPM package](https://www.npmjs.com/), and you will have a website that is written in the native JS language.
|
45
|
+
|
46
|
+
See GitHub for further information. |> https://github.com/filipvrba/ruby-js
|
14
47
|
email: filipvrbaxi@gmail.com
|
15
48
|
executables:
|
16
49
|
- rjsv
|
@@ -18,9 +51,11 @@ extensions: []
|
|
18
51
|
extra_rdoc_files: []
|
19
52
|
files:
|
20
53
|
- app/arguments.rb
|
54
|
+
- app/config.rb
|
21
55
|
- app/main.rb
|
22
56
|
- app/signals.rb
|
23
57
|
- bin/rjsv
|
58
|
+
- lib/description.rb
|
24
59
|
- lib/json_parser.rb
|
25
60
|
- lib/option_parser.rb
|
26
61
|
- lib/ruby_js.rb
|
@@ -29,6 +64,7 @@ files:
|
|
29
64
|
- lib/ruby_js/scaffold.rb
|
30
65
|
- lib/ruby_js/version.rb
|
31
66
|
- share/template/bin/server
|
67
|
+
- share/template/bin/watch
|
32
68
|
- share/template/index.html
|
33
69
|
- share/template/package.json
|
34
70
|
- share/template/public/vite.svg
|
@@ -54,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
90
|
- !ruby/object:Gem::Version
|
55
91
|
version: '0'
|
56
92
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.4.0.dev
|
58
94
|
signing_key:
|
59
95
|
specification_version: 4
|
60
96
|
summary: Converts the syntax of ruby into javascript.
|