Skip to content

Commit

Permalink
chore(tools): run prettier. again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karsa committed Mar 8, 2024
1 parent f8995ac commit b9ea801
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 8 additions & 2 deletions tools/build-icons/building/generateAliasesFile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import path from 'path';
import fs from 'fs';
import { toPascalCase, resetFile, appendFile } from '../../../scripts/helpers.mjs';

const getImportString = (componentName, iconName, aliasImportFileExtension, deprecated, deprecationReason = '') =>
const getImportString = (
componentName,
iconName,
aliasImportFileExtension,
deprecated,
deprecationReason = '',
) =>
deprecated
? `export {\n` +
` /** @deprecated ${deprecationReason} */\n` +
Expand Down Expand Up @@ -32,7 +38,7 @@ export default async function generateAliasesFile({
await Promise.all(
icons.map(async (iconName, index) => {
const componentName = toPascalCase(iconName);
const iconAliases = iconMetaData[iconName]?.aliases?.map(alias => {
const iconAliases = iconMetaData[iconName]?.aliases?.map((alias) => {
if (typeof alias === 'string') {
return {
name: alias,
Expand Down
9 changes: 8 additions & 1 deletion tools/build-icons/building/generateIconFiles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ export default ({
const getSvg = () => readSvg(`${iconName}.svg`, iconsDir);
const { deprecated = false, deprecationReason = '' } = iconMetaData[iconName];

const elementTemplate = template({ componentName, iconName, children, getSvg, deprecated, deprecationReason });
const elementTemplate = template({
componentName,
iconName,
children,
getSvg,
deprecated,
deprecationReason,
});
const output = pretty
? prettier.format(elementTemplate, {
singleQuote: true,
Expand Down

0 comments on commit b9ea801

Please sign in to comment.