Skip to content

Commit

Permalink
Merge pull request #773 from thundersdata-frontend/svgicon-issue
Browse files Browse the repository at this point in the history
fix: 修复mkdirp API 使用错误
  • Loading branch information
chj-damon authored Nov 21, 2023
2 parents 4556536 + be1c4f7 commit 9b4e63b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-mirrors-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@td-design/svgicon-cli': patch
---

修复mkdirp API 使用错误
4 changes: 2 additions & 2 deletions packages/svgicon-cli/src/libs/generateComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import colors from 'colors';
import fs from 'fs';
import { globSync } from 'glob';
import { camelCase, upperFirst } from 'lodash';
import mkdirp from 'mkdirp';
import { mkdirpSync } from 'mkdirp';
import path from 'path';

import { ILocalSvg } from '../libs/parseLocalSvg';
Expand Down Expand Up @@ -34,7 +34,7 @@ export const generateComponent = (localSvg: ILocalSvg[], config: Config) => {
const jsExtension = '.ts';
let cases = '';

mkdirp.sync(saveDir);
mkdirpSync(saveDir);
globSync(path.join(saveDir, '*')).forEach(file => fs.unlinkSync(file));
svgComponents.add('GProps');

Expand Down

0 comments on commit 9b4e63b

Please sign in to comment.