@oceanbase/icons-svg
v1.0.10
Published
Use svg icon like @ant-design/icons.
Downloads
503
Readme
📦 Install
npm install @oceanbase/icons-svg
📢 Requirement
Directory tree should be like below:
├── package.json
├── scripts
│ ├── generate.ts
├── src
├── svg
│ ├── filled
│ ├── outlined
│ ├── twotone
│ └── colored
🔨 Usage
scripts/generate.ts
:
import { resolve } from 'path';
import { appendFileSync } from 'fs';
import { reactIconsGeneratorFromSVGDir } from '@oceanbase/icons-svg';
export async function generateIcons() {
await reactIconsGeneratorFromSVGDir({
entry: resolve(__dirname, '../svg'),
output: resolve(__dirname, '../src'),
typescript: true,
});
}
generateIcons();
package.json
:
{
"scripts": {
"build": "npm run generate && ${YOUR_BUILD_COMMAND}",
"generate": "rm -rf src && ts-node scripts/generate.ts"
}
}