addyosmani / addyosmani/polymer-browserify-vulcanize

Thoughts on shimming polymer?

Aperta
#2 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
22
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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: )

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.