addyosmani / addyosmani/polymer-browserify-vulcanize

Thoughts on shimming polymer?

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22
Forks
0
PR merge metrics
No merged PRs in 30d

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.