inline-style-prefixer
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -1,24 +0,24 @@ | ||
var caniuse = require('caniuse-api') | ||
var searchMap = require('./searchMap') | ||
var fs = require('fs') | ||
var caniuse = require('caniuse-api'); | ||
var searchMap = require('./searchMap'); | ||
var fs = require('fs'); | ||
var browsers = ['chrome', 'safari', 'firefox', 'opera', 'ie', 'ios_saf', 'android', 'and_chr', 'and_uc', 'op_mini', 'ie_mob'] | ||
var browsers = ['chrome', 'safari', 'firefox', 'opera', 'ie', 'ios_saf', 'android', 'and_chr', 'and_uc', 'op_mini', 'ie_mob']; | ||
function gatherInformation() { | ||
var prefixProperties = {} | ||
browsers.forEach(browser => { | ||
prefixProperties[browser] = {} | ||
var prefixProperties = {}; | ||
browsers.forEach(function(browser) { | ||
prefixProperties[browser] = {}; | ||
}) | ||
var search | ||
var search; | ||
for (search in searchMap) { | ||
var properties = searchMap[search] | ||
var properties = searchMap[search]; | ||
var versions = caniuse.getSupport(search, true); | ||
if (properties instanceof Array !== true) { | ||
properties = [properties] | ||
properties = [properties]; | ||
} | ||
properties.forEach(prop => { | ||
var prefix | ||
properties.forEach(function (prop) { | ||
var prefix; | ||
for (prefix in prefixProperties) { | ||
prefixProperties[prefix][prop] = versions[prefix].x | ||
prefixProperties[prefix][prop] = versions[prefix].x; | ||
} | ||
@@ -31,5 +31,5 @@ }) | ||
fs.writeFile('./caniuseData.js', gatherInformation(), function (err){ | ||
if (err) throw err | ||
console.log("Successfully generated CSS property vendor-prefix data using latest caniuse.com data.") | ||
console.log("Support following browser: ", browsers.join(', ')) | ||
if (err) throw err; | ||
console.log("Successfully generated CSS property vendor-prefix data using latest caniuse.com data."); | ||
console.log("Support following browser: ", browsers.join(', ')); | ||
}) |
{ | ||
"name": "inline-style-prefixer", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Autoprefixer for Inline Style objects using userAgent and caniuse data", | ||
@@ -5,0 +5,0 @@ "main": "lib/Prefixer.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
22827