Comparing version 0.0.7 to 0.0.8
@@ -24,2 +24,6 @@ /* | ||
function hex2rgb(hex){ | ||
return 'rgb('+parseInt(hex.substr(0, 2), 16)+','+parseInt(hex.substr(2, 2), 16)+','+parseInt(hex.substr(4, 2), 16)+')'; | ||
} | ||
handlebars.registerHelper('sassVar', function(options){ | ||
@@ -45,3 +49,13 @@ return '$' + options.fn(this).toLowerCase().replace(/_/g, '-'); | ||
}); | ||
handlebars.registerHelper('iOSValue', function(options){ | ||
var value = options.fn(this); | ||
// convert hex colors to rgb | ||
if(value.indexOf('#') === 0){ | ||
return hex2rgb(value.substr(1)); | ||
}else{ | ||
return value; | ||
} | ||
}); | ||
var getExtensionByType = function(type){ | ||
@@ -48,0 +62,0 @@ switch(type){ |
{ | ||
"name": "theo", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Theme tokenizer working with JSON input generating variables for Sass, Stylus, Less, Aura, iOS (plist) and Android (XML)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -136,3 +136,3 @@ /* | ||
result.should.containEql('<key>COLOR_PRIMARY</key>'); | ||
result.should.containEql('<string>#2a94d6</string>'); | ||
result.should.containEql('<string>rgb(42,148,214)</string>'); | ||
}); | ||
@@ -139,0 +139,0 @@ |
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
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
23106
287