facets icon indicating copy to clipboard operation
facets copied to clipboard

Please build the custom elements for reusability in Polymer apps

Open JosefJezek opened this issue 7 years ago • 3 comments

We need reusable custom elements for Polymer app without TypeScript. Please build facets elements to pure JS and distribute these elements with this repo. Thank you.

JosefJezek avatar Nov 13 '17 16:11 JosefJezek

You can use the elements from this repo without typescript in a way similar to how our demo webpage (https://pair-code.github.io/facets/) does it. We ship a facets-dist.html in the dist directory of the repo and you can use this html to include the elements in your own website. You can see the HTML/JS that accomplishes this for the demo webpage here: https://github.com/PAIR-code/facets/blob/gh-pages/index.html#L311

Basically, if you import the facets-dist.html in your own html file then you can create facets-dive and facets-overview elements either in html or programmatically in javascript and reference them in your own javascript.

jameswex avatar Nov 13 '17 20:11 jameswex

We need pure custom elements without dependencies. Element facets-dist is a bad solution for Polymer apps. Element facets-dist contain dependencies Polymer lib and other elements. :-(

JosefJezek avatar Nov 15 '17 09:11 JosefJezek

The fact is that currently it's pretty difficult to use the elements in a 'normal' Polymer app - which is a little shame for a 'Polymer element'. The bundled version clashes with Polymer used in the app, and building/extracting unbundled version of the elements is not trivial. It requires knowing where to grab which files buried deep in the bazel build system, then tanspiling the ES6 scripts and manually resolving dependencies.

It would be nice if - at least - someone knowledgable of the code and the whole build system provided guidance how to 'build' an unbundled element with bazel.

libor-m avatar Nov 20 '17 16:11 libor-m