annotation-poller
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.0.2"></a> | ||
## [2.0.2](https://github.com/npm/annotation-poller/compare/v2.0.1...v2.0.2) (2016-04-21) | ||
### Bug Fixes | ||
* switch to precompiled template ([19a49c2](https://github.com/npm/annotation-poller/commit/19a49c2)) | ||
<a name="2.0.1"></a> | ||
@@ -7,0 +17,0 @@ ## [2.0.1](https://github.com/npm/annotation-poller/compare/v2.0.0...v2.0.1) (2016-04-20) |
30
index.js
var $ = require('jquery') | ||
var Handlebars = require('handlebars') | ||
global.Handlebars = require('handlebars') | ||
require('./annotation.js') | ||
function AnnotationPoller (opts) { | ||
@@ -11,27 +13,3 @@ this._installExtensions() | ||
this.annotations = {} | ||
this.template = Handlebars.compile( | ||
'<li id="annotation-{{id}}" style="{{status}}" data-fingerprint={{fingerprint}}>' + | ||
'<ul class="addon-container">' + | ||
' <li><h3>{{name}}</h3></li>' + | ||
' {{#each rows}}' + | ||
' <li>' + | ||
' {{#hasKey this "image"}}' + | ||
' <img src="{{{image.url}}}" alt="{{image.text}}" />' + | ||
' {{/hasKey}}' + | ||
' {{#hasKey this "link"}}' + | ||
' {{#isArray this "link"}}' + | ||
' {{#each link}}' + | ||
' <a href="{{{url}}}">{{text}}</a>{{#unless @last}},{{/unless}}' + | ||
' {{/each}}' + | ||
' {{else}}' + | ||
' <a href="{{{link.url}}}">{{link.text}}</a>' + | ||
' {{/isArray}}' + | ||
' {{/hasKey}}' + | ||
' {{#hasKey this "text"}}' + | ||
' <span>{{{text}}}</span>' + | ||
' {{/hasKey}}' + | ||
' </li>' + | ||
' {{/each}}' + | ||
'</ul>' + | ||
'</li>') | ||
this.template = Handlebars.templates['annotation.mustache'] | ||
this.addonSelector = '#npm-addon-box' | ||
@@ -38,0 +16,0 @@ } |
{ | ||
"name": "annotation-poller", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "poll for annotations from external services, place them on packages", | ||
"main": "index.js", | ||
"scripts": { | ||
"pretest": "standard", | ||
"pretest": "handlebars annotation.mustache -f annotation.js", | ||
"test": "nyc mocha --timeout=10000 test.js", | ||
@@ -42,3 +42,8 @@ "coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"jquery": "^2.2.2" | ||
}, | ||
"ignore": { | ||
"ignore": [ | ||
"annotation.js" | ||
] | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19585
10
361