You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
875 B
29 lines
875 B
#!/usr/bin/env node
|
|
|
|
const util = require("./util")
|
|
|
|
// the manifest file is easier to parse for us, but the actual source file is icons.yml
|
|
let manifest = util.fread('./templates/.fontcustom-manifest.json')
|
|
let all_enabled = []
|
|
let all_disabled = []
|
|
|
|
for (let key in manifest.glyphs){
|
|
if (manifest.glyphs.hasOwnProperty(key)) {
|
|
all_enabled.push(key)
|
|
all_disabled.push(`#${key}`)
|
|
}
|
|
}
|
|
|
|
console.log(`Found ${all_enabled.length} icons in manifest, writing template files`)
|
|
|
|
util.fwrite('../wanted.all.ini', all_enabled.join('\n') + '\n')
|
|
util.fwrite('../wanted.none.ini', all_disabled.join('\n') + '\n')
|
|
|
|
let fontcustom = util.fread('./templates/fontcustom.yml')
|
|
fontcustom.fonts_path_relative_to_css = './'
|
|
|
|
util.fwrite('../fontcustom.default.yml', fontcustom)
|
|
|
|
if (!util.exists('../fontcustom.yml')) {
|
|
util.cp('../fontcustom.default.yml', '../fontcustom.yml')
|
|
}
|
|
|