Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit a5759da

Browse files
committed
Add summary, usage info, and missing features to README
1 parent c740d20 commit a5759da

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

README.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# Svelte::Rails
1+
# Svelte-Rails
22

3-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/svelte/rails`. To experiment with that code, run `bin/console` for an interactive prompt.
3+
Svelte-Rails integrates [Svelte](https://svelte.dev/) with Ruby on Rails. It has the following features:
44

5-
TODO: Delete this and the text above, and describe your gem
5+
* Automatically renders Svelte server-side and client-side
6+
* Supports Webpacker >= 4.2 and Ruby on Rails >= 6
67

7-
## Installation
8+
## Usage
9+
10+
Make sure, you have [set-up Webpacker](https://github.com/rails/webpacker#installation) and it's [Svelte integration](https://github.com/rails/webpacker/blob/master/docs/integrations.md#svelte).
811

912
Add this line to your application's Gemfile:
1013

@@ -15,30 +18,31 @@ gem 'svelte-rails'
1518
And then execute:
1619

1720
$ bundle install
21+
$ rails generate svelte:install
1822

19-
Or install it yourself as:
20-
21-
$ gem install svelte-rails
22-
23-
## Usage
23+
An example Rails app with svelte-rails can be seen here:
24+
https://github.com/nning/rails-svelte-poc
2425

25-
TODO: Write usage instructions here
26+
## View Helper
2627

27-
## Development
28+
```erb
29+
<%= svelte_component(:Hello, name: 'Svelte') %>
30+
```
2831

29-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32+
## Missing Features
3033

31-
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34+
* Better documentation for setup
35+
* Turbolinks integration
36+
* Rails generator for initial setup (the previously mentioned line does not work, yet)
37+
* HMR and Bundle consistency (server-rendered HTML is cached and client-side updates on changes to the sources)
38+
* Render components directly from controllers
39+
* Generator for components
40+
* Render pools
3241

3342
## Contributing
3443

35-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/svelte-rails. 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/[USERNAME]/svelte-rails/blob/master/CODE_OF_CONDUCT.md).
36-
44+
Bug reports and pull requests are welcome on GitHub at https://github.com/nning/svelte-rails. 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/nning/svelte-rails/blob/master/CODE_OF_CONDUCT.md).
3745

3846
## License
3947

4048
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41-
42-
## Code of Conduct
43-
44-
Everyone interacting in the Svelte::Rails project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/svelte-rails/blob/master/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)