vite_rails 1.0.3 โ 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -1
- data/README.md +27 -65
- data/lib/install/javascript/entrypoints/application.js +8 -4
- data/lib/install/template.rb +3 -23
- data/lib/tasks/vite/build.rake +1 -1
- data/lib/tasks/vite/info.rake +0 -1
- data/lib/vite_rails.rb +6 -1
- data/lib/vite_rails/dev_server_proxy.rb +6 -4
- data/lib/vite_rails/helper.rb +34 -8
- data/lib/vite_rails/manifest.rb +16 -12
- data/lib/vite_rails/version.rb +1 -1
- data/package.json +8 -20
- data/package/default.vite.json +1 -1
- data/test/test_app/app/javascript/entrypoints/application.js +0 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d2a1c3a1fb46873e2b8057e91829a74e6c52a010941ec8abe6ca8055242b71
|
4
|
+
data.tar.gz: 8fbe4d912f70e84631a0131cfc884e4dd547f10105955d6fb1c877d69a22c03c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2807123abe076535c1b5a918d5d6d303b137e1e8025d036692162313ed479500db1fd09ba153e355e33b1a58a9072d19c17b17dc147cd09f841cceffb8d12daa
|
7
|
+
data.tar.gz: 2200102393275515c8dc4ef981a9676460f27e35d48bba8c906535401aea934b5cd08fddbc19bd61bf7aaaf385c2fc7f27ca99eddca12f2ea364373fb7d2fde0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
-
## Vite Rails 1.0.
|
1
|
+
## Vite Rails 1.0.8 (2020-01-20)
|
2
|
+
|
3
|
+
- Change the default of `sourceCodeDir` to `app/frontend`, add instructions for folks migrating
|
4
|
+
from a `app/javascript` structure.
|
5
|
+
|
6
|
+
## Vite Rails 1.0.7 (2020-01-20)
|
7
|
+
|
8
|
+
- Add `vite_client_tag` to ensure the Vite client can be loaded in apps that don't use any imports.
|
9
|
+
|
10
|
+
## Vite Rails 1.0.6 (2020-01-20)
|
11
|
+
|
12
|
+
- Ensure running `bin/rake assets:precompile` automatically invokes `vite:build`.
|
13
|
+
|
14
|
+
## Vite Rails 1.0.5 (2020-01-20)
|
15
|
+
|
16
|
+
- Automatically add `<link rel="modulepreload">` and `<link rel="stylesheet">` when using `vite_javascript_tag`, which simplifies usage.
|
17
|
+
|
18
|
+
## Vite Rails 1.0.4 (2020-01-19)
|
19
|
+
|
20
|
+
- Remove Vue specific examples from installation templates, to ensure they always run.
|
21
|
+
|
22
|
+
## Vite Rails 1.0.0 (2020-01-18)
|
2
23
|
|
3
24
|
Initial Version
|
data/README.md
CHANGED
@@ -19,26 +19,35 @@
|
|
19
19
|
</p>
|
20
20
|
</h1>
|
21
21
|
|
22
|
+
[website]: https://vite-rails.netlify.app/
|
23
|
+
[configuration reference]: https://vite-rails.netlify.app/config/
|
24
|
+
[features]: https://vite-rails.netlify.app/guide/introduction.html
|
25
|
+
[guides]: https://vite-rails.netlify.app/guide/
|
26
|
+
[config]: https://vite-rails.netlify.app/config/
|
22
27
|
[vite_rails]: https://github.com/ElMassimo/vite_rails
|
23
28
|
[webpacker]: https://github.com/rails/webpacker
|
24
29
|
[vite]: http://vitejs.dev/
|
25
30
|
[config file]: https://github.com/ElMassimo/vite_rails/blob/main/package/default.vite.json
|
31
|
+
[example app]: https://github.com/ElMassimo/vite_rails/tree/main/examples/blog
|
32
|
+
[heroku]: https://vite-rails-demo.herokuapp.com/
|
26
33
|
|
27
|
-
[__Vite Rails__][vite_rails] allows you to use [Vite] to power the frontend.
|
34
|
+
[__Vite Rails__][vite_rails] allows you to use [Vite] to power the frontend of your Rails app.
|
28
35
|
|
29
36
|
[Vite] is to frontend tooling as Ruby to programming, pure joy! ๐
|
30
37
|
|
38
|
+
Check an [example app] running on [Heroku].
|
39
|
+
|
31
40
|
## Features โก๏ธ
|
32
41
|
|
33
|
-
- ๐ค Automatic
|
34
|
-
- โก๏ธ
|
35
|
-
-
|
36
|
-
-
|
37
|
-
- And more!
|
42
|
+
- ๐ค Automatic entrypoint detection
|
43
|
+
- โก๏ธ Blazing fast hot reload
|
44
|
+
- ๐ Zero-config deployments
|
45
|
+
- ๐ค Integrated with <kbd>assets:precompile</kbd>
|
46
|
+
- [And more!][features]
|
38
47
|
|
39
48
|
## Documentation ๐
|
40
49
|
|
41
|
-
|
50
|
+
Visit the [documentation website][website] to check out the [guides] and searchable [configuration reference].
|
42
51
|
|
43
52
|
## Installation ๐ฟ
|
44
53
|
|
@@ -57,74 +66,27 @@ bin/rake vite:install
|
|
57
66
|
|
58
67
|
This will generate configuration files and a sample setup.
|
59
68
|
|
60
|
-
|
61
|
-
|
62
|
-
Drawing inspiration from [webpacker], any files in `app/javascript/entrypoints`
|
63
|
-
will be considered entries to your application (SPAs or pages).
|
64
|
-
|
65
|
-
These files will be detected, and passed on to Vite, all configuration is done
|
66
|
-
for you.
|
67
|
-
|
68
|
-
### Imports โคต๏ธ
|
69
|
-
|
70
|
-
For convenience, a `~/` import alias is configured to `app/javascript`, allowing
|
71
|
-
you to use absolute paths:
|
69
|
+
Additional installation instructions are available in the [documentation website][website].
|
72
70
|
|
73
|
-
|
74
|
-
import { createApp } from 'vue'
|
75
|
-
import App from '~/App.vue'
|
76
|
-
import '~/channels'
|
71
|
+
## Getting Started ๐ป
|
77
72
|
|
78
|
-
|
79
|
-
```
|
80
|
-
|
81
|
-
### Tags ๐ท
|
82
|
-
|
83
|
-
`vite_typescript_tag`, `vite_javascript_tag`, and `vite_stylesheet_tag` can be
|
84
|
-
used to output `<script>` and `<link>` tags in your Rails layouts or templates.
|
73
|
+
Restart your Rails server, and then run <kbd>bin/vite</kbd> to start the Vite development server.
|
85
74
|
|
86
|
-
|
87
|
-
<head>
|
88
|
-
<title>Joie</title>
|
89
|
-
<%= csrf_meta_tags %>
|
90
|
-
<%= csp_meta_tag %>
|
75
|
+
Add the following your `views/layouts/application.html.erb`:
|
91
76
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<%= vite_stylesheet_tag 'strange' %>
|
96
|
-
<%= vite_typescript_tag 'application' %>
|
97
|
-
</head>
|
77
|
+
```erb
|
78
|
+
<%= vite_client_tag %>
|
79
|
+
<%= vite_javascript_tag 'application' %>
|
98
80
|
```
|
99
81
|
|
100
|
-
|
101
|
-
|
102
|
-
## Configuration โ๏ธ
|
103
|
-
|
104
|
-
This is what your `config/vite.json` might look like:
|
105
|
-
|
106
|
-
```json
|
107
|
-
{
|
108
|
-
"all": {
|
109
|
-
"watchAdditionalPaths": []
|
110
|
-
},
|
111
|
-
"development": {
|
112
|
-
"autoBuild": true,
|
113
|
-
"publicOutputDir": "vite-dev",
|
114
|
-
"port": 3036
|
115
|
-
},
|
116
|
-
"test": {
|
117
|
-
"autoBuild": true,
|
118
|
-
"publicOutputDir": "vite-test"
|
119
|
-
}
|
120
|
-
}
|
121
|
-
```
|
82
|
+
Visit any page and you should see a printed console output: `Vite โก๏ธ Rails`.
|
122
83
|
|
123
|
-
|
84
|
+
For more [guides] and a full [configuration reference], check the [documentation website][website].
|
124
85
|
|
125
|
-
##
|
86
|
+
## Special Thanks ๐
|
126
87
|
|
127
88
|
- [webpacker]
|
89
|
+
- [vite]
|
128
90
|
|
129
91
|
## License
|
130
92
|
|
@@ -1,3 +1,10 @@
|
|
1
|
+
// To see this message, add the following to the `<head>` section in your
|
2
|
+
// views/layouts/application.html.erb
|
3
|
+
//
|
4
|
+
// <%= vite_client_tag %>
|
5
|
+
// <%= vite_javascript_tag 'application' %>
|
6
|
+
console.log('Vite โก๏ธ Rails')
|
7
|
+
|
1
8
|
// Example: Load Rails libraries in Vite.
|
2
9
|
//
|
3
10
|
// import '@rails/ujs'
|
@@ -11,8 +18,5 @@
|
|
11
18
|
// Turbolinks.start()
|
12
19
|
// ActiveStorage.start()
|
13
20
|
|
14
|
-
// Example: Import a stylesheet in app/
|
21
|
+
// Example: Import a stylesheet in app/frontend/index.css
|
15
22
|
// import '~/index.css'
|
16
|
-
|
17
|
-
console.log('Vite โก๏ธ Rails')
|
18
|
-
|
data/lib/install/template.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Install Vite Rails
|
4
4
|
say 'Creating configuration files'
|
5
5
|
copy_file "#{ __dir__ }/config/vite.json", ViteRails.config.config_path
|
6
|
-
copy_file "#{ __dir__ }/config/vite.config.ts", Rails.root
|
6
|
+
copy_file "#{ __dir__ }/config/vite.config.ts", Rails.root.join('vite.config.ts')
|
7
7
|
|
8
8
|
say 'Creating entrypoints directory'
|
9
9
|
directory "#{ __dir__ }/javascript/entrypoints", ViteRails.config.source_code_dir.join(ViteRails.config.entrypoints_dir)
|
@@ -26,14 +26,6 @@ if git_ignore_path.exist?
|
|
26
26
|
}
|
27
27
|
end
|
28
28
|
|
29
|
-
install = if Rails.root.join('yarn.lock').exist?
|
30
|
-
'yarn add'
|
31
|
-
elsif Rails.root.join('pnpm-lock.yaml').exist?
|
32
|
-
'pnpm install'
|
33
|
-
else
|
34
|
-
'npm install'
|
35
|
-
end
|
36
|
-
|
37
29
|
Dir.chdir(Rails.root) do
|
38
30
|
say 'Installing JavaScript dependencies for Vite Rails'
|
39
31
|
package_json = File.read("#{ __dir__ }/../../package.json")
|
@@ -42,19 +34,7 @@ Dir.chdir(Rails.root) do
|
|
42
34
|
plugin_version = package_json.match(/"vite-plugin-ruby": "(.*)"/)[1]
|
43
35
|
|
44
36
|
say 'Installing vite as direct dependencies'
|
45
|
-
run "
|
46
|
-
end
|
47
|
-
|
48
|
-
if Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR > 1
|
49
|
-
src = begin
|
50
|
-
"#{ ViteRails.config.protocol }://#{ ViteRails.config.host_with_port }"
|
51
|
-
rescue StandardError
|
52
|
-
'http://localhost:3036'
|
53
|
-
end
|
54
|
-
say 'You need to allow vite-dev-server host as allowed origin for connect-src.', :yellow
|
55
|
-
say 'This can be done in Rails 5.2+ for development environment in the CSP initializer', :yellow
|
56
|
-
say 'config/initializers/content_security_policy.rb with a snippet like this:', :yellow
|
57
|
-
say %(policy.connect_src :self, :https, "http://#{ src }", "ws://#{ src }" if Rails.env.development?), :yellow
|
37
|
+
run "yarn add vite@#{ vite_version } vite-plugin-ruby@#{ plugin_version }"
|
58
38
|
end
|
59
39
|
|
60
|
-
say '
|
40
|
+
say 'Vite โก๏ธ Rails successfully installed! ๐', :green
|
data/lib/tasks/vite/build.rake
CHANGED
data/lib/tasks/vite/info.rake
CHANGED
@@ -14,7 +14,6 @@ namespace :vite do
|
|
14
14
|
$stdout.puts "vite-plugin-ruby: \n#{ `npm list vite-plugin-ruby version` }"
|
15
15
|
|
16
16
|
$stdout.puts "Is bin/vite present?: #{ File.exist? 'bin/vite' }"
|
17
|
-
$stdout.puts "Is bin/vite-dev-server present?: #{ File.exist? 'bin/vite-dev-server' }"
|
18
17
|
$stdout.puts "Is bin/yarn present?: #{ File.exist? 'bin/yarn' }"
|
19
18
|
end
|
20
19
|
end
|
data/lib/vite_rails.rb
CHANGED
@@ -22,7 +22,7 @@ class ViteRails
|
|
22
22
|
cattr_accessor(:logger) { ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT)) }
|
23
23
|
|
24
24
|
class << self
|
25
|
-
delegate :config, :builder, :manifest, :commands, :dev_server, to: :instance
|
25
|
+
delegate :config, :builder, :manifest, :commands, :dev_server, :dev_server_running?, to: :instance
|
26
26
|
delegate :mode, to: :config
|
27
27
|
delegate :bootstrap, :clean, :clobber, :build, to: :commands
|
28
28
|
|
@@ -62,6 +62,11 @@ class ViteRails
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
# Public: Returns true if the Vite development server is running.
|
66
|
+
def dev_server_running?
|
67
|
+
ViteRails.run_proxy? && dev_server.running?
|
68
|
+
end
|
69
|
+
|
65
70
|
# Public: Current instance configuration for Vite.
|
66
71
|
def config
|
67
72
|
@config ||= ViteRails::Config.resolve_config
|
@@ -14,7 +14,7 @@ class ViteRails::DevServerProxy < Rack::Proxy
|
|
14
14
|
|
15
15
|
# Rack: Intercept asset requests and send them to the Vite server.
|
16
16
|
def perform_request(env)
|
17
|
-
if vite_should_handle?(env['REQUEST_URI']) && dev_server.running?
|
17
|
+
if vite_should_handle?(env['REQUEST_URI'], env['HTTP_REFERER']) && dev_server.running?
|
18
18
|
env['REQUEST_URI'] = env['REQUEST_URI']
|
19
19
|
.sub(vite_asset_url_prefix, '/')
|
20
20
|
.sub('.ts.js', '.ts') # Patch: Rails helpers always append the extension.
|
@@ -36,9 +36,11 @@ private
|
|
36
36
|
|
37
37
|
delegate :config, :dev_server, to: :@vite_rails
|
38
38
|
|
39
|
-
def vite_should_handle?(url)
|
40
|
-
url.start_with?(vite_asset_url_prefix)
|
41
|
-
|
39
|
+
def vite_should_handle?(url, referer)
|
40
|
+
return true if url.start_with?(vite_asset_url_prefix) # Vite Asset
|
41
|
+
return true if url.start_with?(VITE_DEPENDENCY_PREFIX) # Vite Package Asset
|
42
|
+
return true if url.include?('?t=') # Hot Reload
|
43
|
+
return true if referer && URI.parse(referer).path.start_with?(vite_asset_url_prefix) # Entry Imported from another Entry.
|
42
44
|
end
|
43
45
|
|
44
46
|
def vite_asset_url_prefix
|
data/lib/vite_rails/helper.rb
CHANGED
@@ -2,40 +2,66 @@
|
|
2
2
|
|
3
3
|
# Public: Allows to render HTML tags for scripts and styles processed by Vite.
|
4
4
|
module ViteRails::Helper
|
5
|
+
DEFAULT_VITE_SKIP_PRELOAD_TAGS = Rails::VERSION::MAJOR <= 5 && Rails::VERSION::MINOR < 2
|
6
|
+
|
5
7
|
# Public: Returns the current Vite Rails instance.
|
6
8
|
def current_vite_instance
|
7
9
|
ViteRails.instance
|
8
10
|
end
|
9
11
|
|
12
|
+
# Public: Renders a script tag for vite/client to enable HMR in development.
|
13
|
+
def vite_client_tag
|
14
|
+
content_tag('script', '', src: '/@vite/client', type: 'module') if ViteRails.dev_server_running?
|
15
|
+
end
|
16
|
+
|
10
17
|
# Public: Computes the relative path for the specified given Vite asset.
|
11
18
|
#
|
12
19
|
# Example:
|
13
20
|
# <%= vite_asset_path 'calendar.css' %> # => "/vite/assets/calendar-1016838bab065ae1e122.css"
|
14
21
|
def vite_asset_path(name, **options)
|
15
|
-
current_vite_instance.manifest.lookup!(name, **options)
|
22
|
+
current_vite_instance.manifest.lookup!(name, **options).fetch('file')
|
16
23
|
end
|
17
24
|
|
18
25
|
# Public: Renders a <script> tag for the specified Vite entrypoints.
|
19
|
-
def vite_javascript_tag(*names,
|
20
|
-
|
26
|
+
def vite_javascript_tag(*names,
|
27
|
+
type: 'module',
|
28
|
+
asset_type: :javascript,
|
29
|
+
skip_preload_tags: DEFAULT_VITE_SKIP_PRELOAD_TAGS,
|
30
|
+
skip_style_tags: false,
|
31
|
+
crossorigin: 'anonymous',
|
32
|
+
**options)
|
33
|
+
js_entries = names.map { |name| current_vite_instance.manifest.lookup!(name, type: asset_type) }
|
34
|
+
js_tags = javascript_include_tag(*js_entries.map { |entry| entry['file'] }, type: type, crossorigin: crossorigin, **options)
|
35
|
+
|
36
|
+
unless skip_preload_tags || ViteRails.dev_server_running?
|
37
|
+
preload_paths = js_entries.flat_map { |entry| entry['imports'] }.compact.uniq
|
38
|
+
preload_tags = preload_paths.map { |path| preload_link_tag(path, crossorigin: crossorigin) }
|
39
|
+
end
|
40
|
+
|
41
|
+
unless skip_style_tags || ViteRails.dev_server_running?
|
42
|
+
style_paths = names.map { |name| current_vite_instance.manifest.lookup(name, type: :stylesheet)&.fetch('file') }.compact
|
43
|
+
style_tags = stylesheet_link_tag(*style_paths)
|
44
|
+
end
|
45
|
+
|
46
|
+
safe_join [js_tags, preload_tags, style_tags]
|
21
47
|
end
|
22
48
|
|
23
49
|
# Public: Renders a <script> tag for the specified Vite entrypoints.
|
24
50
|
#
|
25
51
|
# NOTE: Because TypeScript is not a valid target in browsers, we only specify
|
26
52
|
# the ts file when running the Vite development server.
|
27
|
-
def vite_typescript_tag(*names,
|
28
|
-
|
53
|
+
def vite_typescript_tag(*names, **options)
|
54
|
+
vite_javascript_tag(*names, asset_type: :typescript, **options)
|
29
55
|
end
|
30
56
|
|
31
57
|
# Public: Renders a <link> tag for the specified Vite entrypoints.
|
32
58
|
def vite_stylesheet_tag(*names, **options)
|
33
|
-
stylesheet_link_tag(*
|
59
|
+
stylesheet_link_tag(*sources_from_vite_manifest(names, type: :stylesheet), **options)
|
34
60
|
end
|
35
61
|
|
36
62
|
private
|
37
63
|
|
38
|
-
def
|
39
|
-
names.
|
64
|
+
def sources_from_vite_manifest(names, type:)
|
65
|
+
names.map { |name| vite_asset_path(name, type: type) }
|
40
66
|
end
|
41
67
|
end
|
data/lib/vite_rails/manifest.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# Example:
|
7
7
|
# lookup_entrypoint('calendar', type: :javascript)
|
8
|
-
# => "/vite/assets/calendar-1016838bab065ae1e314.js"
|
8
|
+
# => { "file" => "/vite/assets/calendar-1016838bab065ae1e314.js", "imports" => [] }
|
9
9
|
#
|
10
10
|
# NOTE: Using "autoBuild": true` in `config/vite.json` file will trigger a build
|
11
11
|
# on demand as needed, before performing any lookup.
|
@@ -29,7 +29,8 @@ class ViteRails::Manifest
|
|
29
29
|
# Returns a relative path, or nil if the asset is not found.
|
30
30
|
#
|
31
31
|
# Example:
|
32
|
-
# ViteRails.manifest.lookup('calendar.js')
|
32
|
+
# ViteRails.manifest.lookup('calendar.js')
|
33
|
+
# # { "file" => "/vite/assets/calendar-1016838bab065ae1e122.js", "imports" => [] }
|
33
34
|
def lookup(name, type:)
|
34
35
|
build if should_build?
|
35
36
|
|
@@ -43,12 +44,7 @@ class ViteRails::Manifest
|
|
43
44
|
|
44
45
|
private
|
45
46
|
|
46
|
-
delegate :config, :builder, :
|
47
|
-
|
48
|
-
# Public: Returns true if the Vite development server is running.
|
49
|
-
def dev_server_running?
|
50
|
-
ViteRails.run_proxy? && dev_server.running?
|
51
|
-
end
|
47
|
+
delegate :config, :builder, :dev_server_running?, to: :@vite_rails
|
52
48
|
|
53
49
|
# NOTE: Auto compilation is convenient when running tests, when the developer
|
54
50
|
# won't focus on the frontend, or when running the Vite server is not desired.
|
@@ -59,9 +55,9 @@ private
|
|
59
55
|
# Internal: Finds the specified entry in the manifest.
|
60
56
|
def find_manifest_entry(name)
|
61
57
|
if dev_server_running?
|
62
|
-
"/#{ config.public_output_dir.join(name.to_s) }"
|
63
|
-
|
64
|
-
|
58
|
+
{ 'file' => "/#{ config.public_output_dir.join(name.to_s) }" }
|
59
|
+
else
|
60
|
+
manifest[name.to_s]
|
65
61
|
end
|
66
62
|
end
|
67
63
|
|
@@ -83,7 +79,10 @@ private
|
|
83
79
|
# Internal: Returns a Hash with the entries in the manifest.json.
|
84
80
|
def load_manifest
|
85
81
|
if config.manifest_path.exist?
|
86
|
-
JSON.parse(config.manifest_path.read)
|
82
|
+
JSON.parse(config.manifest_path.read).each do |_, entry|
|
83
|
+
entry['file'] = within_public_output_dir(entry['file'])
|
84
|
+
entry['imports'] = entry['imports']&.map { |path| within_public_output_dir(path) }
|
85
|
+
end
|
87
86
|
else
|
88
87
|
{}
|
89
88
|
end
|
@@ -96,6 +95,11 @@ private
|
|
96
95
|
"#{ name }.#{ extension_for_type(entry_type) }"
|
97
96
|
end
|
98
97
|
|
98
|
+
# Internal: Scopes the paths in the manifest to the output folder in public.
|
99
|
+
def within_public_output_dir(path)
|
100
|
+
"/#{ config.public_output_dir.join(path) }"
|
101
|
+
end
|
102
|
+
|
99
103
|
# Internal: Allows to receive :javascript and :stylesheet as :type in helpers.
|
100
104
|
def extension_for_type(entry_type)
|
101
105
|
case entry_type
|
data/lib/vite_rails/version.rb
CHANGED
data/package.json
CHANGED
@@ -2,27 +2,15 @@
|
|
2
2
|
"name": "only-for-workflows",
|
3
3
|
"version": "unknown",
|
4
4
|
"scripts": {
|
5
|
-
"
|
6
|
-
"
|
5
|
+
"docs": "npm -C docs run docs",
|
6
|
+
"docs:build": "npm -C docs run docs:build",
|
7
|
+
"docs:search": "npm -C docs run docs:search",
|
8
|
+
"docs:lint": "npm -C docs run lint",
|
9
|
+
"lint": "npm -C package run lint",
|
10
|
+
"test": "npm -C package run test"
|
7
11
|
},
|
8
12
|
"dependencies": {
|
9
|
-
"vite": "^2.0.0-beta.
|
10
|
-
"vite-plugin-ruby": "1.0.
|
11
|
-
},
|
12
|
-
"devDependencies": {
|
13
|
-
"@vitejs/plugin-vue": "^1.0.6",
|
14
|
-
"eslint": "^7.16.0",
|
15
|
-
"eslint-config-airbnb": "^18.2.0",
|
16
|
-
"eslint-config-prettier": "^7.1.0",
|
17
|
-
"eslint-plugin-import": "^2.22.1",
|
18
|
-
"eslint-plugin-jsx-a11y": "^6.3.1",
|
19
|
-
"eslint-plugin-react": "^7.21.4",
|
20
|
-
"jest": "^26.5.3"
|
21
|
-
},
|
22
|
-
"jest": {
|
23
|
-
"testRegex": "(/__tests__/.*|(\\.|/))\\.jsx?$",
|
24
|
-
"roots": [
|
25
|
-
"<rootDir>/package"
|
26
|
-
]
|
13
|
+
"vite": "^2.0.0-beta.34",
|
14
|
+
"vite-plugin-ruby": "^1.0.2"
|
27
15
|
}
|
28
16
|
}
|
data/package/default.vite.json
CHANGED
@@ -1,10 +1,2 @@
|
|
1
1
|
/* eslint no-console:0 */
|
2
|
-
// This file is automatically compiled by Vite, along with any other files
|
3
|
-
// present in this directory. You're encouraged to place your actual application logic in
|
4
|
-
// a relevant structure within app/javascript and only use these pack files to reference
|
5
|
-
// that code so it'll be compiled.
|
6
|
-
//
|
7
|
-
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
|
8
|
-
// layout file, like app/views/layouts/application.html.erb
|
9
|
-
|
10
2
|
console.log('Hello World from ViteRails')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vite_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mรกximo Mussini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -186,8 +186,8 @@ homepage: https://github.com/ElMassimo/vite_rails
|
|
186
186
|
licenses:
|
187
187
|
- MIT
|
188
188
|
metadata:
|
189
|
-
source_code_uri: https://github.com/ElMassimo/vite_rails/tree/v1.0.
|
190
|
-
changelog_uri: https://github.com/ElMassimo/vite_rails/blob/v1.0.
|
189
|
+
source_code_uri: https://github.com/ElMassimo/vite_rails/tree/v1.0.8
|
190
|
+
changelog_uri: https://github.com/ElMassimo/vite_rails/blob/v1.0.8/CHANGELOG.md
|
191
191
|
post_install_message:
|
192
192
|
rdoc_options: []
|
193
193
|
require_paths:
|