1.0.4 • Published 3 years ago
@cc-heart/icon-class-generate v1.0.4
icon class generate
Parse the css (for example iconfont) of the third-party library to generate the class class name
install
npm install @cc-heart/icon-class-generateUsage
- Create a
.iconrc.jsfile in the root directory
Add the following configuration
module.exports = {
iconList: ['https://at.alicdn.com/t/c/font_3590164_vc3wep8wbzf.css'],
outDir: '/icon'
}- Create a
jsfile(for example,js file name isgenIcon.js) that runs to generate the icon class
const { bootstrap } = require('@cc-heart/icon-class-generate');
bootstrap()Run the js file
node genIcon.jsAn icon.json file lives in the specified outdir file directory
{
"acade-1": [
"acade-1 icon-wangluokecheng"
]
}