desirae-datamap-ruhoh
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "desirae-datamap-ruhoh", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/DearDesi/datamap-ruhoh", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -10,4 +10,20 @@ /*jshint -W054 */ | ||
var newview | ||
, analytics | ||
, comments | ||
; | ||
comments = view.site.disqus_shortname && | ||
Mustache.render(view.desi.partials.disqus, { disqus: { | ||
shortname: view.site.disqus_shortname | ||
, identifier: view.entity.disqus_identifier || undefined | ||
, url: !view.entity.disqus_identifier && view.entity.disqus_url || undefined | ||
}}) | ||
; | ||
analytics = view.site.google_analytics_tracking_id && | ||
Mustache.render(view.desi.partials.google_analytics, { google_analytics: { | ||
tracking_id: view.site.google_analytics_tracking_id | ||
}}) | ||
; | ||
newview = { | ||
@@ -38,5 +54,5 @@ content: view.contents | ||
base_url: view.env.base_url | ||
// /something -> good (leading slash) | ||
// / -> bad (trailing slash) | ||
, base_path: view.env.base_path.replace(/^\/$/, '') | ||
// /something/ -> good (leading and trailing slash) | ||
// / -> bad good (leading and trailing slash) | ||
, base_path: (view.env.base_path + '/').replace('//', '/') | ||
} | ||
@@ -50,15 +66,17 @@ , data: { | ||
} | ||
, stylesheets: { 'load': function () { | ||
return function (text, render) { | ||
// TODO pay attention to text of which styles to load? | ||
// this is unescaped, right? | ||
console.log('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ magicstache'); | ||
return render(view.desi.styles.join('\n')); | ||
}; | ||
}} | ||
, styles: view.desi.styles.join('\n') | ||
, assets: view.desi.styles.join('\n') // ruhoh-twitter | ||
, assets: view.desi.styles.join('\n') // ruhoh-twitter only | ||
, comments: comments // ruhoh-twitter only | ||
, analytics: analytics // ruhoh-twitter only | ||
, widgets: { | ||
comments: view.site.disqus_shortname && | ||
Mustache.render(view.desi.partials.disqus, { disqus: { | ||
shortname: view.site.disqus_shortname | ||
, identifier: view.entity.disqus_identifier || undefined | ||
, url: !view.entity.disqus_identifier && view.entity.disqus_url || undefined | ||
}}) | ||
, analytics: view.site.google_analytics_tracking_id && | ||
Mustache.render(view.desi.partials.google_analytics, { google_analytics: { | ||
tracking_id: view.site.google_analytics_tracking_id | ||
}}) | ||
comments: comments | ||
, analytics: analytics | ||
, facebook_connect: view.desi.partials.facebook_connect | ||
@@ -93,3 +111,8 @@ , twitter: view.desi.partials.twitter | ||
// shoulda made this an object at the start... oops | ||
map.ruhoh = map; | ||
map['ruhoh@1.0'] = map; | ||
map['ruhoh@2.6'] = map; | ||
exports.DesiraeDatamapRuhoh = map.DesiraeDatamapRuhoh = map; | ||
}('undefined' !== typeof exports && exports || window)); |
{ | ||
"name": "desirae-datamap-ruhoh", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A ruhoh datamap plugin for desirae", | ||
@@ -5,0 +5,0 @@ "main": "datamapper-ruhoh.js", |
# datamap-ruhoh | ||
A ruhoh-compatible data mapper for desirae | ||
A ruhoh-compatible data mapper for [desirae](http://dear.desi) | ||
This mapper attempts to map both `ruhoh@1.0` (ruhoh-twitter) | ||
and `ruhoh@2.6` (ruhoh-bootstrap-2) views onto the same object. | ||
As it turns out, there don't seem to be any conflicts, | ||
but if we find out there are, we can separate into two functions. | ||
```bash | ||
npm install --save desirae-datamap-ruhoh | ||
bower install --save desirae-datamap-ruhoh | ||
``` | ||
### browser | ||
```javascript | ||
Desirae.registerDataMapper('ruhoh', exports.DesiraeDatamapRuhoh); | ||
Desirae.registerDataMapper('ruhoh@1.0', exports.DesiraeDatamapRuhoh); | ||
Desirae.registerDataMapper('ruhoh@2.6', exports.DesiraeDatamapRuhoh); | ||
``` | ||
### io.js / node.js | ||
```javascript | ||
Desirae.registerDataMapper('ruhoh', require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); | ||
Desirae.registerDataMapper('ruhoh@1.0', require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); | ||
Desirae.registerDataMapper('ruhoh@2.6', require('desirae-datamap-ruhoh').DesiraeDatamapRuhoh); | ||
``` |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
32
18607
6
136
1