addyosmani / addyosmani/polymer-browserify-vulcanize

Thoughts on shimming polymer?

未关闭
#2 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
22
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。