Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await walk(async ({ svgIdentifier, name, theme, icon }) => {
const inlineIcon = renderIconDefinitionToSVGElement({ name, theme, icon });
svgIdentifier = adaptTheme(svgIdentifier);
const _theme = adaptTheme(theme) as AngularTheme;
// Generate static loading resources.
await fsPromises.writeFile(
path.resolve(__dirname, `../src/icons/${_theme}/${svgIdentifier}.ts`),
staicFileRender({ svgIdentifier, name, theme: _theme, inlineIcon })
);
await fsPromises.writeFile(
path.resolve(__dirname, `../src/inline-svg/${_theme}/${name}.svg`),
svgRender({ inlineIcon })
);