Skip to content

codergeek121/custom_elements-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Custom Elements with Rails

This gem provides a small helper and installation scripts to use custom elements in conjunction with importmap-rails.

Usage

Installation

Add this line to your application's Gemfile:

gem "custom_elements-rails"

Install the gem:

$ bundle install

Run the initial setup:

$ rails custom_elements:install

This will setup and add the following files:

app/javascript
β”œβ”€β”€ application.js
└── custom_elements
    β”œβ”€β”€ hello_element.js
    └── index.js

You can now add the <app-hello> custom element in your app. No build step needed.

Add a custom element

TODO

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

About

Custom Elements + Importmap + Rails = πŸŽ‰

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published