Created
September 29, 2017 08:41
-
-
Save cajus/b00bbeb629013fb73a1bd8431e88c18a to your computer and use it in GitHub Desktop.
Convert fontawesome icon.yml to qx character map
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const yaml = require('js-yaml') | |
const fs = require('fs') | |
let res = {} | |
let doc = yaml.safeLoad(fs.readFileSync('icons.yml', 'utf8')) | |
doc.icons.forEach((iconDsc) => { | |
res[iconDsc.id] = iconDsc.unicode | |
if (res.aliases) { | |
res.aliases.forEach((alias) => { | |
res[alias] = iconDsc.unicode | |
}) | |
} | |
}) | |
fs.writeFileSync('fontawesome.map', JSON.stringify(res)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment