Why is there no javascript file?
It feels odd to do this:
link(rel="import" href="lib/polymer.html")
Is there a way to include a script instead, I would like to use Borwserify and require Polymer.
Or could someone enlighten me about how to use Polymer properly?
Checkout how web components work.
@Silom Polymer seems to be encouraging using the new HTML5 Imports to include Polymer. They are also using Bower as the package manager.
Importing the polymer.html includes the 3 scripts to get polymer running (polymer.js, polymer-mini.js, polymer-micro.js).
So at the moment, no easy way to use Browserify to require Polymer into your project.
@birkir not very helpful, since I was asking about implementation and not feature set.
@clintonjrobinson thanks for clearing things up for me. I think its odd to provide a javascript API interface with only giving you the global scope of Polymer, as a developer I rather like to choose how I implement a library. I need a alternative for that, the way it is right now I can not add it to my architecture without losing consistency.
@Silom Not saying I agree or not, but as I understand Polymer is aiming to be more than just a UI library. It's a set of polyfills that fill in any gaps in HTML5 standard that the executing browser may not have implemented yet. So from Polymers perspective it should be global scope, because your browser should have all this stuff in the global scope anyways.
Web components built with Polymer require HTML imports, because a Polymer element definition has both a script and an HTML component, and unlike legacy JS loaders, HTML Imports allows marshaling both script and markup together using a browser primitive that allows multi-threaded parsing of HTML.
We would love to allow the Polymer API itself to be imported into your JS scope via a module system, however we are avoiding to "choose" a blessed module system that puts a module dependency or transpiler requirement on the user, and instead have chosen to use one global (Polymer) until such time that ES6 modules are a shipping feature in browsers without requiring transpilation.
@kevinpschaaf thanks for the reply, makes sense now. Maybe I can jump into Polymer better when I use this vulcanized tool. I will give it another shot.