javascriptpolymerfrontendpolymer-3.x

How to publish Polymer 3.x custom element?


I am learning polymer3.x. I made a dummy polymer element. Now i wanted to know how to publish online and use it in some other framework(eg: angular app).

I completed the requirements as mentioned in https://www.webcomponents.org,

But while doing "preview element" i got Error - 12: Missing bower.json. Currently, only Bower is supported. From Polymer version 3, the Polymer team recommends npm instead of Bower.

How to publish my polymer element, so I can use it in another app (like Angular app)?


Solution

  • Update 2

    You can now publish your element on NPM and then use the web components page to publish it on the site


    Update 1

    Publishing polymer 3 elements in webcomponents.org is not supported yet, it is on the roadmap

    According to Polymer team:

    The element catalog at webcomponents.org will be updated to support elements built with modules and distributed via npm.

    But you can still just publish your element on npm

    See How to Publish & Update a Package on npm