Skip to content

Commit

Permalink
fix: 修复mkdirp API 使用错误
Browse files Browse the repository at this point in the history
  • Loading branch information
chj-damon committed Nov 21, 2023
1 parent f77a440 commit be1c4f7
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 be1c4f7

Please sign in to comment.