Skip to content

Commit 13ee0a5

Browse files
committed
fix(@fluent-ui/icons): Delete icon book-mark
1 parent 4fc083c commit 13ee0a5

File tree

141 files changed

+1251
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1251
-26
lines changed

packages/fluent-ui-icons/builder.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,25 @@ async function worker(): Promise<void> {
6161
try {
6262
const allSvg = await getAllSvgs(basePath)
6363
const template = await readFileAsync(resolve(__dirname, './template'), { encoding: 'utf8' })
64+
6465
for (const svg of allSvg) {
6566
const data = await readFileAsync(svg, { encoding: 'utf8' })
6667
const jsx = html([data])
67-
const componentName = getComponentName(svg, false)
68+
const componentName = toHump(getComponentName(svg, false))
6869
const jsxReplace = template
6970
.replace('{{jsx}}', toJson(jsx))
70-
.replace('{{componentName}}', toHump(componentName))
71+
.replace('{{componentName}}', componentName)
72+
7173
await writeFileAsync(
72-
resolve(__dirname, `src/${toHump(componentName)}.ts`),
73-
prettier.format(jsxReplace, { singleQuote: true, semi: false, parser: 'typescript' })
74+
resolve(__dirname, `src/${componentName}.ts`),
75+
prettier.format(jsxReplace, { singleQuote: true, semi: false, parser: 'typescript' }),
76+
{ flag: 'wx' }
7477
)
7578
}
7679

7780
const index = allSvg.reduce((acc, cur): string => {
78-
const componentName = getComponentName(cur, false)
79-
return (
80-
acc + `export { default as ${toHump(componentName)} } from './${toHump(componentName)}'\n`
81-
)
81+
const componentName = toHump(getComponentName(cur, false))
82+
return acc + `export { default as ${componentName} } from './${componentName}'\n`
8283
}, '')
8384
await writeFileAsync(resolve(__dirname, `src/index.ts`), index)
8485
} catch (error) {
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions
Lines changed: 6 additions & 0 deletions

0 commit comments

Comments
 (0)