Skip to content

Commit

Permalink
chore: optimize email icons generator
Browse files Browse the repository at this point in the history
Sometimes we need to generate PNG from icons and add them to images.kiwi.
The script to generate them was optimized and now generates the whole directory
to be copied and pasted there.
  • Loading branch information
DSil committed Aug 14, 2024
1 parent 08b005e commit e2f39eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ function generatePath(targetDir: string) {
});

await Promise.all(promises);

// Copy svg files to the destination
await fs.copyFile("./orbit-svgs.zip", `${DIR}/orbit-svgs.zip`);

// Copy font files to the destination
await fs.copyFile("./orbit-icons-font.zip", `${DIR}/orbit-icons-font.zip`);
} catch (error) {
console.error(error);
}
Expand Down
4 changes: 3 additions & 1 deletion packages/orbit-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"fetch:icons": "node --loader ts-node/esm config/fetchIcons.mts",
"check:icons": "node --loader ts-node/esm config/checkIconsCli.mts",
"check:types": "tsc --p tsconfig.json",
"build:iconsPng": "node --loader ts-node/esm config/generatePngIcons.mts",
"build:icons": "node --loader ts-node/esm config/build/buildIcons.mts",
"build:iconsFont": "node --loader ts-node/esm config/createSVGFont.mts",
"build:emailIcons": "yarn build:icons && yarn build:iconsFont && node --loader ts-node/esm config/generateEmailIcons.mts",
"build:storybook": "node --loader ts-node/esm config/build/buildIcons.mts && storybook build -c .storybook -o .out",
"eslint:check": "eslint . --report-unused-disable-directives",
"test-ct": "playwright test -c playwright-ct.config.ts",
Expand Down

0 comments on commit e2f39eb

Please sign in to comment.