在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:bcherny/savant开源软件地址:https://github.com/bcherny/savant开源编程语言:JavaScript 87.6%开源软件介绍:
installation# with npm:
npm install -g savant
# or, with bower:
bower install savant usagePut your SVG icons in a folder, give them dash-cased names, and prefix them with the unicode charcode you want assigned to them. For example, let's say you have 3 icons in a folder called "src" ( Run
CLI usagesavant --in [input_dir] --out [output_dir] --name [font_name] --prefix [prefix]
# eg.
savant --in src/ --out dist/ --name my-font --prefix abc
# basic usage
savant -i src -o dist
Programmatic usage
#!/usr/bin/env node
require('savant')
.compile({
input_dir: './src',
output_dir: './dist'
})
.then(function () {
console.log('success!')
})
.catch(function (err) {
console.log('error!', err)
})
.finally(function () {
console.log('done!')
}) q&aHow does savant know what to name my font? If you pass a name in via the CLI or programmatic interface, savant will use that.
If you run the How does savant know how to prefix my font's CSS classes? If you pass a prefix in via the CLI or programmatic interface, savant will use that. Otherwise, savant will compute a prefix based on your font name (eg. "my-awesome-font" will become "maf") todo
based onhttps://github.com/bcherny/svg-font-create |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论