Using Polymer tools and libraries outside of Polymer

106 views
Skip to first unread message

Kiran Rao

unread,
Dec 18, 2014, 1:57:57 AM12/18/14
to polym...@googlegroups.com
Hi,

I want to use some of the polymer "libraries" outside of polymer itself. I am aware that some of the libraries have been documented as being usable stand-alone, but I could not find much info on how to do that.

For example, since I am not using ShadowDOM, I'm content with webcomponents-lite polyfill, which I'm using in combination with X-Tags. Now, I wish to introduce polymer's TemplateBinding into the mix. The docs for TemplateBinding do mention that it can be used stand-alone but I'm not sure what the implications are. I could not find it on bower.

A peek into the source code tells me that it depends on observe.js. Is observe.js included already in webcomponents-lite as part of MutationObservers?

I also used vulcanize with X-tags and it seemed to work fine (I just used --inline --csp). Is there any limitation that I should be aware of while using vulcanize with a non-polymer project?

Kiran Rao

unread,
Dec 18, 2014, 6:39:34 AM12/18/14
to polym...@googlegroups.com
I just saw the State of the Union talk and the Polymer Panel talk at Chrome Dev Summit, and it looks like maybe my questions will be better answered once Polymer 0.8 is available?

Rob Dodson

unread,
Dec 29, 2014, 9:33:49 PM12/29/14
to Kiran Rao, polymer-dev
Is observe.js included already in webcomponents-lite as part of MutationObservers?

I don't think so. I think you'll need to include it separately.

The bower.json file for TemplateBinding includes dependencies for observe-js and Node.bind. I think you'll need both of those.

You should be able to `bower install polymer/TemplateBinding` to get everything. Then I think you'll need to run grunt to build a version that has everything concatenated. I've never actually tried to load TemplateBinding by itself so apologies if any of these instructions are in error :D

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/4324a390-9a98-4ea4-a2e9-2900f3bb1993%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kiran Rao

unread,
Dec 30, 2014, 11:31:01 PM12/30/14
to polym...@googlegroups.com, techie....@gmail.com
Thanks for the pointers. I'll give it a shot.

Kiran Rao

unread,
Jan 7, 2015, 1:52:27 AM1/7/15
to polym...@googlegroups.com, techie....@gmail.com
It turns out there is an example right in the examples/ folder of the TemplateBinding repo. The "tic-tac-toe.html" example demonstrates how to use the TemplateBinding stand-alone without Polymer.
Reply all
Reply to author
Forward
0 new messages