Polymer and Rails, with the asset pipeline

463 views
Skip to first unread message

Ahuth

unread,
Mar 4, 2014, 10:35:56 PM3/4/14
to polym...@googlegroups.com
Hi,
Tonight I finished the first release of a ruby gem that integrates Polymer with the Rails asset pipeline. Essentially, it allows you to specify what web components you want to import, and then automatically generates html import tags for those and any of their dependencies. Also, it inlines any external css or javascript references.

Finally, in production, it concatenates all of the imports into one big import, and removes any html/js/css comments and blank lines.

So pretty much what Vulcanize does, except for Rails.

It doesn't install Polymer or any components for you, so you need to
1. Download and include platform.js
2. Install any web components you want to use (usually into /vendor/assets/elements)
3. Use assets/elements/application.html just like you would to include javascript files, and you're in business.

It's called Emcee, and the github repo is here: https://github.com/ahuth/emcee.

If anyone takes a look it or uses it, and has any comments or critiques, let me know. I welcome contributions. Feel free to ask questions or give me feedback here, too.

tla....@gmail.com

unread,
Jun 26, 2014, 8:50:05 AM6/26/14
to polym...@googlegroups.com
Hi, Thanks a lot for the cool gem, but can we combine polymer and backbone in rails ? Have you done similar experiment ?

Thank you
Reply all
Reply to author
Forward
0 new messages