iconfont-map-builder
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -33,5 +33,4 @@ #!/usr/bin/env node | ||
if(matched){ | ||
console.log(); | ||
var content = elem.style.content.replace(/"\\f([0-9a-z]+)"/,'$1;'); | ||
map[String(matched[nameGrp])] = String(content); | ||
var content = elem.style.content.replace(/"\\([0-9a-z]+)"/,'0x$1'); | ||
map[String(matched[nameGrp])] = parseInt(content); | ||
} | ||
@@ -44,3 +43,3 @@ } | ||
JSON.stringify(map), | ||
";module.exports = (name)=>map[name];"]; | ||
";module.exports = (name)=>String.fromCharCode(map[name]);"]; | ||
fs.writeFileSync(mapFile,output.join('\n')); | ||
@@ -47,0 +46,0 @@ } |
{ | ||
"name": "iconfont-map-builder", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Transform iconfont's css file to js 'name-character' map ", | ||
@@ -12,7 +12,11 @@ "main": "index.js", | ||
}, | ||
"keywords": [], | ||
"repository":{ | ||
"type":"git", | ||
"url":"https://github.com/sospartan/iconfont-map-builder" | ||
}, | ||
"keywords": ["css","iconfont","font"], | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"author": "sospartan", | ||
"author": "sospartan@gmail.com", | ||
"license": "ISC", | ||
@@ -19,0 +23,0 @@ "dependencies": { |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
56309
1
2696