Skip to content

Commit

Permalink
Merge pull request #179 from skryukov/fix-ci
Browse files Browse the repository at this point in the history
Various installation generator fixes
  • Loading branch information
bknoles authored Jan 11, 2025
2 parents 8c749e3 + c44d21d commit 0f69e56
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
tailwind: [true, false]
ruby: ['3.3']
node: ['22']
inertia_version: ['1.2.0', 'next', 'beta']
inertia_version: ['1.2.0', '1.3', '2.0']
exclude:
# 1.2.0 does not support typescript
- typescript: true
Expand Down
3 changes: 1 addition & 2 deletions lib/generators/inertia/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ def install_inertia
template 'initializer.rb', file_path('config/initializers/inertia_rails.rb')

say 'Installing Inertia npm packages'
add_dependencies(*FRAMEWORKS[framework]['packages'])
add_dependencies(inertia_package)
add_dependencies(inertia_package, *FRAMEWORKS[framework]['packages'])

unless File.read(vite_config_path).include?(FRAMEWORKS[framework]['vite_plugin_import'])
say "Adding Vite plugin for #{framework}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ createInertiaApp({

setup({ el, App, props }) {
if (el) {
<%= " // @ts-expect-error 1.3.0 beta contains types mismatch\n" if inertia_resolved_version == Gem::Version.new('1.3.0-beta.2') -%>
<%= " // @ts-expect-error 1.3.0 contains types mismatch\n" if inertia_resolved_version.release == Gem::Version.new('1.3.0') -%>
mount(App, { target: el, props })
} else {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ createInertiaApp({

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

0 comments on commit 0f69e56

Please sign in to comment.