Skip to content

Commit 0f69e56

Browse files
authored
Merge pull request #179 from skryukov/fix-ci
Various installation generator fixes
2 parents 8c749e3 + c44d21d commit 0f69e56

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

.github/workflows/generators.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
tailwind: [true, false]
2626
ruby: ['3.3']
2727
node: ['22']
28-
inertia_version: ['1.2.0', 'next', 'beta']
28+
inertia_version: ['1.2.0', '1.3', '2.0']
2929
exclude:
3030
# 1.2.0 does not support typescript
3131
- typescript: true

lib/generators/inertia/install/install_generator.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ def install_inertia
7878
template 'initializer.rb', file_path('config/initializers/inertia_rails.rb')
7979

8080
say 'Installing Inertia npm packages'
81-
add_dependencies(*FRAMEWORKS[framework]['packages'])
82-
add_dependencies(inertia_package)
81+
add_dependencies(inertia_package, *FRAMEWORKS[framework]['packages'])
8382

8483
unless File.read(vite_config_path).include?(FRAMEWORKS[framework]['vite_plugin_import'])
8584
say "Adding Vite plugin for #{framework}"

lib/generators/inertia/install/templates/svelte/inertia.ts.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ createInertiaApp({
3232

3333
setup({ el, App, props }) {
3434
if (el) {
35-
<%= " // @ts-expect-error 1.3.0 beta contains types mismatch\n" if inertia_resolved_version == Gem::Version.new('1.3.0-beta.2') -%>
35+
<%= " // @ts-expect-error 1.3.0 contains types mismatch\n" if inertia_resolved_version.release == Gem::Version.new('1.3.0') -%>
3636
mount(App, { target: el, props })
3737
} else {
3838
console.error(

lib/generators/inertia/install/templates/svelte4/inertia.ts.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ createInertiaApp({
3131

3232
setup({ el, App, props }) {
3333
if (el) {
34-
<%= "// @ts-expect-error 1.3.0 beta contains types mismatch\n" if inertia_resolved_version == Gem::Version.new('1.3.0-beta.2') -%>
34+
<%= "// @ts-expect-error 1.3.0 beta contains types mismatch\n" if inertia_resolved_version.release == Gem::Version.new('1.3.0') -%>
3535
new App({ target: el, props })
3636
} else {
3737
console.error(

0 commit comments

Comments
 (0)