reactionview 0.4.1 → 0.6.0

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: 43fa5419017a9eff054e1d12e443c925859341904fe130290aba029c3322251e
4
- data.tar.gz: d929b2fb1d57e3e08b0b3e8d98edf8817abdb01d2ebe329c940428077480aa35
3
+ metadata.gz: d00bf236b1d0595c0fc499c4a2d86c66db69b7843eb6eb7bc4333186f995a658
4
+ data.tar.gz: f9daac5ed2c13e3d3aebc8a11ce2dab4f3cc5e14e33bf23cb69d8bf067981a1b
5
5
  SHA512:
6
- metadata.gz: ed31a65611c1321d61d9d080104b4973976ae0fb9eab2e56e2aa587cb8bbdee7f34fc53dbea2f39a8ba70627630bfadf8a86dd6b52b23c6fa691b08d33be5a02
7
- data.tar.gz: ad83ce4e14e73bf3c5bcc95f74ca14922494ed5df0f7a4a77f260489816e6f8f155cb04f910e50d5ac33f49c99d35c8899db7a8686df00dc296e64710e530043
6
+ metadata.gz: 595376e89cfc374ac49b284c8a3e3de8669b02e3e021afbde54653ddde9e75f1a61aecb4716f10e77711534ffb4df20fb92f889d73c4af8d6734a4f503e6c847
7
+ data.tar.gz: 47b1fdec634ef1baddbfdf1e40dfdd92e8719964155985ce586a7ed61a5c66b5d3cd6b88bf93cb7923e44f5ee6747b3d2c945c59b6633fc4a9e0b4cc79714c3e
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  <div align="center">
2
- <img alt="ReActionView - Enhanced Rails templates" style="height: 256px" height="256px" src="https://github.com/marcoroth/reactionview/blob/main/assets/reactionview.png?raw=true">
2
+ <img alt="ReActionView" style="height: 256px" height="256px" src="https://github.com/marcoroth/reactionview/blob/main/assets/reactionview.png?raw=true">
3
3
  </div>
4
4
 
5
5
  <h2 align="center">ReActionView</h2>
6
6
 
7
- <h4 align="center">A new ActionView-compatible ERB engine with modern DX - re-imagined with <a href="https://github.com/marcoroth/herb"><code>Herb::Engine</code></a>.</h4>
7
+ <h4 align="center">Reactive views for the HTML+ERB you already have.</h4>
8
8
 
9
- <div align="center">Seamless integration of Herb's HTML-aware ERB rendering engine into Rails applications. <br>Compatible with <code>.html.erb</code>, but with modern enhancements:
10
- HTML validation, better error feedback, a developer-friendly debug mode, and more!</div><br/>
9
+ <div align="center">You get what a client-side framework gives you, without adopting one.</div><br/>
10
+
11
+ <div align="center">No new syntax · No client framework · No API layer · No build step</div><br/>
11
12
 
12
13
  <p align="center">
13
14
  <a href="https://rubygems.org/gems/reactionview"><img alt="Gem Version" src="https://img.shields.io/gem/v/reactionview"></a>
@@ -16,61 +17,43 @@ HTML validation, better error feedback, a developer-friendly debug mode, and mor
16
17
  <a href="https://github.com/marcoroth/reactionview/issues"><img alt="Issues" src="https://img.shields.io/github/issues/marcoroth/reactionview"></a>
17
18
  </p>
18
19
 
19
- <br/><br/><br/>
20
-
21
- ## Installation
22
-
23
- Add to your Rails application:
24
-
25
- ```bash
26
- bundle add reactionview
27
- rails generate reactionview:install
28
- ```
29
-
30
- ## Usage
20
+ <br/>
31
21
 
32
- ReActionView provides two ways to use enhanced template processing:
22
+ **ReActionView makes your existing HTML+ERB templates reactive.**
33
23
 
34
- 1. **Native `.html.herb` templates** - Automatically processed with `Herb::Engine`.
35
- 2. **Intercept `.html.erb` templates** - Enable in config to process all HTML+ERB templates with Herb.
24
+ Rails 8.2 already renders HTML templates with `Herb::Engine`, which reads the HTML and the Ruby in a template together. ReActionView builds on that. A template declares state the browser owns, changes it with an HTML attribute, and has your controller answer when the server is needed. There is no second copy of the page to keep in sync.
36
25
 
37
- ### Configuration
26
+ It also brings Herb's error overlays, the dev tools and per-tag instrumentation to the page, so a mismatched tag or a `<div>` inside a `<p>` shows up in the browser with the file and the line while you work. On Rails 8.1 and earlier, it brings the engine itself.
38
27
 
39
- ```ruby
40
- # config/initializers/reactionview.rb
28
+ ### Documentation
41
29
 
42
- ReActionView.configure do |config|
43
- # Intercept .html.erb templates to use Herb::Engine
44
- # config.intercept_erb = true
30
+ [reactionview.dev](https://reactionview.dev/overview)
45
31
 
46
- # Enable debug mode
47
- config.debug_mode = Rails.env.development?
32
+ ### Installation
48
33
 
49
- # Custom path for editor "open in editor" links (optional, defaults to Rails.root)
50
- # config.project_path = ENV.fetch('PROJECT_PATH', Rails.root.to_s)
34
+ ```bash
35
+ bundle add reactionview
36
+ bin/rails generate reactionview:install
37
+ ```
51
38
 
52
- # Validation mode (:raise, :overlay, or :none) — defaults to :raise in test, :overlay otherwise
53
- # config.validation_mode = :overlay
39
+ The generator creates `config/initializers/reactionview.rb` and imports the client from `app/javascript/application.js`. On importmap-rails the gem pins the client for you. With a bundler, install the `reactionview` npm package as well.
54
40
 
55
- # How to handle templates that come from gems (:fallback, :skip, or :compile), defaults to :fallback
56
- # config.external_template_mode = :skip
57
- end
58
- ```
41
+ ReActionView needs Ruby 3.2 or newer and Rails 7.0 or newer. [Setup](https://reactionview.dev/installation) covers turning on reactive templates and checking that it works, and the [Quick Start](https://reactionview.dev/quick-start) builds a first reactive page.
59
42
 
60
- ## Development
43
+ ### Development
61
44
 
62
45
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
63
46
 
64
47
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
65
48
 
66
- ## Contributing
49
+ ### Contributing
67
50
 
68
51
  Bug reports and pull requests are welcome on GitHub at https://github.com/marcoroth/reactionview. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/marcoroth/reactionview/blob/main/CODE_OF_CONDUCT.md).
69
52
 
70
- ## Code of Conduct
53
+ ### Code of Conduct
71
54
 
72
55
  Everyone interacting in the ReActionView project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/marcoroth/reactionview/blob/main/CODE_OF_CONDUCT.md).
73
56
 
74
- ## License
57
+ ### License
75
58
 
76
59
  This project is available as open source under the terms of the [MIT License](https://github.com/marcoroth/reactionview/blob/main/LICENSE.txt).