Low commit activity in last 3 years
No release in over a year
Web components utils for rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 3.0, < 4.0

Runtime

>= 1.12, < 2.0
>= 6.0
~> 1.1, >= 1.1.1
 Project Readme

web_components_rails

Ruby gem for using web components in Rails applications.

Usage

  1. Include the gem in your Gemfile:
gem 'web_components_rails'
  1. Add an HTML file to your project (can be just HTML or a Polymer component):
<!-- app/assets/javascripts/my_component.html -->
<h1>Hello</h1>
  1. Include a web component in one of your views:
<%= html_import_tag 'my_component' %>

Optimized JavaScript

If you'd like the scripts in your HTML bundles to be combined, minified using Uglifier, and data-src encoded for performance:

# In an initializer or somewhere on rails load
WebComponentsRails.optimize_scripts = true

Building

After adding new features or fixes, please update the version in version.rb, and then tag the repo appropriately:

git tag -a -m 'Added foo' 1.1.0
git push --tags

To release the gem (internally), use rake build, and push the gem with stickler.