Skip to content

Commit

Permalink
fix: build icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Oct 12, 2023
1 parent 160eaf7 commit 5654709
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"css-loader": "^4.3.0",
"mini-css-extract-plugin": "^2.7.6",
"mkdirp": "^1.0.4",
"prettier": "^3.0.3",
"react": "^17.0.2",
"react-use": "^17.4.0",
"string-replace-loader": "^2.3.0",
Expand Down
11 changes: 6 additions & 5 deletions packages/icons/scripts/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ fs.readdirSync(iconSrcFolder)
});
});

fs.writeFileSync(
path.join(srcFolder, 'typeUtils.ts'),
prettier.format(
prettier
.format(
`
export declare type IconName =
${icons}
Expand Down Expand Up @@ -56,5 +55,7 @@ export declare type Icon<S extends IconSize> = {
};
`,
{ singleQuote: true, parser: 'typescript' },
),
);
)
.then(data => {
fs.writeFileSync(path.join(srcFolder, 'typeUtils.ts'), data);
});

0 comments on commit 5654709

Please sign in to comment.