Adding Assets via plugin similar to Bower?

(Emanuelet) #1

Hi Guys,
I’m developing a customised Discourse and I ran into an issue.
I will like to add Polymer on my assets, but I will like to do it in a maintainable way (something similar of having a bower.json) through a plugin.

Any suggestion on the right way to do it?
NPM Ember-polymer?
Gem ? (polymer-elements-rails?)


(Robin Ward) #2

Right now we’re not using anything like bower or npm although at some point I’d like to get us set up.

It would be cool if someone could create a bower/npm plugin for discourse so you could have a json file and have it install the dependencies you need.

Until then, you will be forced to create a plugin that just imports a vendored file.

(Emanuelet) #3

Ok, I’ll add them manually.

My only other question is: can I do something like this to import the various components?
register_asset 'bower_components/paper-button/paper-button.html'

The way you do in regular html is
<link rel="import" href="../bower_components/paper-button/paper-button.html">

(Aedensixty) #4

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

(Aedensixty) #5

I am trying to do the same thing. Is there anymore information on this?

We are trying to get polymer elements working in a plugin. Is there some way to use html imports with the register_asset function?