addyosmani / addyosmani/polymer-browserify-vulcanize

Thoughts on shimming polymer?

Ouverte
#2 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
22
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hey Addy!

I've been trying to get a working demo of browserify and polymer playing nicely together. I've successfully got it working here: [reggi/demo-browserify-polymer](https://github.com/reggi/demo-browserify-polymer)

You can see this example component here [moment-time/moment-time.js](https://github.com/reggi/demo-browserify-polymer/blob/master/components/moment-time/moment-time.js) which looks something like this:

```
var Polymer = require("polymer")
var moment = require("moment")

Polymer("moment-time", {
ready: function() {
var $this = this
setInterval(function(){
$this.time = moment().format($this.format)
}, 1000);
}
});
```

I was just wondering why you used the global wrapper you have [here](https://github.com/addyosmani/polymer-browserify-vulcanize/blob/master/app/scripts/my-element.js#L45) instead of a shim. (Also wanted to point you in the direction of my work, would love to hear your thoughts! :cake: :cactus: :penguin: :smile: :doughnut: )

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.