rubyjs-vite 1.0.1 → 1.0.2

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: 8f5d8e9992a474d2a8689effcf8359dc05e292fffa2ce2221481113b3c8a4a61
4
- data.tar.gz: 2a42b9944ec6aaed4634b66da95658523c64dc480df64725c122bec9ebede6b3
3
+ metadata.gz: 1d8be56a5cd62d9c0cc4751a44ea778fbee3dabead90381f28e3d8664c2266f3
4
+ data.tar.gz: d4af48e85e48a5deef17f59620e9a558930b463fc5b33338daeb04cdde15d5ee
5
5
  SHA512:
6
- metadata.gz: '09353285f8edabbc3677f6ba38f52d8a8532308dbf585db2e7119398d83193928963f7d792b0892905a5d14630b9d845a7359c300b8cdafc730ab96915310386'
7
- data.tar.gz: 04f42d8f430d5cab01d5c09839a0094dedc94ca176eb5c57cef041086ad7f4e30874235d93af068b2323f4df720546c7f5c10d7267de90846f5a68405fb40c29
6
+ metadata.gz: ad86cf0733735f3cd6290881c9dff9b247459035801e46b82f8d1660f6bdb59c13a8b83b1027c6f14ee0358b8b9825dca646ee93cfe24c333100ab8f2a3f1de0
7
+ data.tar.gz: 63c92ff729d76d0ea5d55df1712e4731f06c944ecedd58e9723e71f1f26b7cccc00289932a87b2e8a1b0cd50fd16b67a45b0d1be3cc17e47784b4674d13afa48
data/app/arguments.rb CHANGED
@@ -5,7 +5,7 @@ require "option_parser"
5
5
  watch: false,
6
6
  output: Dir.pwd,
7
7
  source: Dir.pwd,
8
- eslevel: "2021".to_i
8
+ eslevel: Config::get_eslevel
9
9
  }
10
10
 
11
11
  OptionParser.parse do |parser|
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
@@ -1,4 +1,5 @@
1
1
  require "ruby_js"
2
+ require_relative "config"
2
3
  require_relative "arguments"
3
4
  require_relative "signals"
4
5
 
@@ -0,0 +1,10 @@
1
+ module Description
2
+ module_function
3
+
4
+ def get_readme(parag_count)
5
+ path_ra = File.expand_path("..", __dir__)
6
+ path_fa = File.join(path_ra, 'README.md')
7
+ content = File.open(path_fa).read.split("\n")[1..parag_count + 1]
8
+ content.join("\n")
9
+ end
10
+ end
@@ -12,12 +12,12 @@ 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
- change_server_f(path_ao)
15
+ change_watch_f(path_ao)
16
16
  install_vite(project, path_ao)
17
17
  end
18
18
 
19
- def self.change_server_f path_ao
20
- path_bin_ao = "#{path_ao}/bin/server"
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)
@@ -1,3 +1,3 @@
1
1
  module RubyJS
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  #!/bin/bash
2
2
 
3
- APP_NAME -c -w -s src/rjs -o src/.js &
3
+ . $(pwd)/bin/watch &
4
4
  npm run dev
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ APP_NAME -c -w -s src/rjs -o src/.js
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.1
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-04 00:00:00.000000000 Z
11
+ date: 2022-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2js
@@ -38,7 +38,12 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.7'
41
- description: 'To learn more, go to this page: https://github.com/filipvrba/ruby-js'
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
42
47
  email: filipvrbaxi@gmail.com
43
48
  executables:
44
49
  - rjsv
@@ -46,9 +51,11 @@ extensions: []
46
51
  extra_rdoc_files: []
47
52
  files:
48
53
  - app/arguments.rb
54
+ - app/config.rb
49
55
  - app/main.rb
50
56
  - app/signals.rb
51
57
  - bin/rjsv
58
+ - lib/description.rb
52
59
  - lib/json_parser.rb
53
60
  - lib/option_parser.rb
54
61
  - lib/ruby_js.rb
@@ -57,6 +64,7 @@ files:
57
64
  - lib/ruby_js/scaffold.rb
58
65
  - lib/ruby_js/version.rb
59
66
  - share/template/bin/server
67
+ - share/template/bin/watch
60
68
  - share/template/index.html
61
69
  - share/template/package.json
62
70
  - share/template/public/vite.svg