rondale-sc / poc-ember-cli-polymer

Proof of Concept for an ember-cli addon to include polymer (core and paper)
MIT License
0 stars 0 forks source link

role of elements.html file #1

Open taras opened 9 years ago

taras commented 9 years ago

It looks like elements.html file is used by vulcanize to figure out what elements should be concatenated. It would be cool if we could import these files with app.import in Brocfile.js and import custom elements from /elements directory. It would eliminate the need for elements.html completely.

Brocfile.js

app.import('bower_components/core-elements/core-elements.html')

/elements directory

svg-pulsing-circle.html

What do you think?

rondale-sc commented 9 years ago

Wouldn't you need to know how to traverse the nested link tags then?

(Still trying to understand how and why polymer has their bower repos structured in this fashion)

taras commented 9 years ago

vulcanize would still concatenate the assets but instead of parsing a file, we'd give it an array of file paths.

rondale-sc commented 9 years ago

I'm not so sure how much more understandable that'd be than the elements.html file. Is the idea that we'd get value later when we allow custom elements.

We are tossing around the idea of precompiling all of it (core and paper) to reduce initial build time.

taras commented 9 years ago

We are tossing around the idea of precompiling all of it (core and paper) to reduce initial build time.

This is an interesting thought.

taras commented 9 years ago

I'm not so sure how much more understandable that'd be than the elements.html file. Is the idea that we'd get value later when we allow custom elements.

I'd even go one step further by saying that we could go one step further by allowing to breakup elements into their parts.

/elements
  /svg-pulsing-circle
    /template.html
    /script.js
    /style.css

We could concatenate these into html files and compile them with vulcanize. It'd basically make working with polymer components like with Ember components.

Maybe too far?