inertia_rails 3.7.0 → 3.7.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/generators/inertia/install/templates/react/InertiaExample.jsx +1 -1
- data/lib/generators/inertia/install/templates/react/inertia.js +3 -3
- data/lib/generators/inertia/install/templates/vue/inertia.js +3 -3
- data/lib/inertia_rails/generators/helper.rb +5 -3
- data/lib/inertia_rails/version.rb +1 -1
- data/lib/patches/mapper.rb +1 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23cbc78f6ae041fed8c26c46f5da887291f40d96bb755386ad888fdfe545343c
|
4
|
+
data.tar.gz: 26839f99bcdc7bc96cf6a82d5aa4730688c6c019089b82041020b4e0896b7549
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 134e4664360f7a72f6d38e47153c49348b38eae52b765f0c9da5b7b62e4f48d1d9ed9986bfac6d729739a3954c5860f4348798ac6caca6256e692a13ce74d798
|
7
|
+
data.tar.gz: fafd03acd45c4be9c9cf01159fe2a54e0bdf174a4fb02fbd80d9cfc93b026b1693bbf68a0ad53c15db4894514655dab70408c8551422c16c43305ade43984058
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [3.7.1] - 2025-04-01
|
8
|
+
|
9
|
+
* Docs updates
|
10
|
+
* Fix for namespaced static routes (@skyrukov)
|
11
|
+
* Fix for detecting tailwindcss in templates (@skyrukov)
|
12
|
+
|
7
13
|
## [3.7.0] - 2025-03-17
|
8
14
|
|
9
15
|
* Docs updates
|
@@ -18,7 +18,7 @@ export default function InertiaExample({ name }) {
|
|
18
18
|
<h1 className={cs.h1}>Hello {name}!</h1>
|
19
19
|
|
20
20
|
<div>
|
21
|
-
<a href="https://inertia-rails.
|
21
|
+
<a href="https://inertia-rails.dev" target="_blank">
|
22
22
|
<img className={cs.logo} src={inertiaSvg} alt="Inertia logo" />
|
23
23
|
</a>
|
24
24
|
<a href="https://vite-ruby.netlify.app" target="_blank">
|
@@ -4,13 +4,13 @@ import { createRoot } from 'react-dom/client'
|
|
4
4
|
|
5
5
|
createInertiaApp({
|
6
6
|
// Set default page title
|
7
|
-
// see https://inertia-rails.
|
7
|
+
// see https://inertia-rails.dev/guide/title-and-meta
|
8
8
|
//
|
9
9
|
// title: title => title ? `${title} - App` : 'App',
|
10
10
|
|
11
11
|
// Disable progress bar
|
12
12
|
//
|
13
|
-
// see https://inertia-rails.
|
13
|
+
// see https://inertia-rails.dev/guide/progress-indicators
|
14
14
|
// progress: false,
|
15
15
|
|
16
16
|
resolve: (name) => {
|
@@ -24,7 +24,7 @@ createInertiaApp({
|
|
24
24
|
|
25
25
|
// To use a default layout, import the Layout component
|
26
26
|
// and use the following lines.
|
27
|
-
// see https://inertia-rails.
|
27
|
+
// see https://inertia-rails.dev/guide/pages#default-layouts
|
28
28
|
//
|
29
29
|
// page.default.layout ||= (page) => createElement(Layout, null, page)
|
30
30
|
|
@@ -3,13 +3,13 @@ import { createApp, h } from 'vue'
|
|
3
3
|
|
4
4
|
createInertiaApp({
|
5
5
|
// Set default page title
|
6
|
-
// see https://inertia-rails.
|
6
|
+
// see https://inertia-rails.dev/guide/title-and-meta
|
7
7
|
//
|
8
8
|
// title: title => title ? `${title} - App` : 'App',
|
9
9
|
|
10
10
|
// Disable progress bar
|
11
11
|
//
|
12
|
-
// see https://inertia-rails.
|
12
|
+
// see https://inertia-rails.dev/guide/progress-indicators
|
13
13
|
// progress: false,
|
14
14
|
|
15
15
|
resolve: (name) => {
|
@@ -20,7 +20,7 @@ createInertiaApp({
|
|
20
20
|
|
21
21
|
// To use a default layout, import the Layout component
|
22
22
|
// and use the following lines.
|
23
|
-
// see https://inertia-rails.
|
23
|
+
// see https://inertia-rails.dev/guide/pages#default-layouts
|
24
24
|
//
|
25
25
|
// const page = pages[`../pages/${name}.vue`]
|
26
26
|
// page.default.layout = page.default.layout || Layout
|
@@ -4,7 +4,9 @@ module InertiaRails
|
|
4
4
|
module Generators
|
5
5
|
module Helper
|
6
6
|
class << self
|
7
|
-
|
7
|
+
DEFAULT_PACKAGE_PATH = Rails.root.join('package.json')
|
8
|
+
|
9
|
+
def guess_the_default_framework(package_json_path = DEFAULT_PACKAGE_PATH)
|
8
10
|
package_json = JSON.parse(package_json_path.read)
|
9
11
|
dependencies = package_json['dependencies'] || {}
|
10
12
|
|
@@ -25,8 +27,8 @@ module InertiaRails
|
|
25
27
|
Rails.root.join('tsconfig.json').exist?
|
26
28
|
end
|
27
29
|
|
28
|
-
def guess_inertia_template
|
29
|
-
if
|
30
|
+
def guess_inertia_template(package_json_path = DEFAULT_PACKAGE_PATH)
|
31
|
+
if package_json_path.read.include?('"tailwindcss"')
|
30
32
|
'inertia_tw_templates'
|
31
33
|
else
|
32
34
|
'inertia_templates'
|
data/lib/patches/mapper.rb
CHANGED
@@ -3,9 +3,7 @@ module InertiaRails
|
|
3
3
|
def inertia(*args, **options)
|
4
4
|
path = args.any? ? args.first : options
|
5
5
|
route, component = extract_route_and_component(path)
|
6
|
-
|
7
|
-
get(route, to: 'inertia_rails/static#static', defaults: { component: component }, **options)
|
8
|
-
end
|
6
|
+
get(route, to: StaticController.action(:static), defaults: { component: component }, **options)
|
9
7
|
end
|
10
8
|
|
11
9
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inertia_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Knoles
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
- Eugene Granovsky
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|