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 })
);
exports.getComponentNameList = () => {
const icons = [];
Object.keys(manifest).forEach(theme => {
manifest[theme].forEach(name => {
const baseName = upperFirst(camelCase(name));
icons.push({
theme,
componentName: baseName + upperFirst(themeMap[theme]),
svgName: baseName + upperFirst(theme === 'twotone' ? 'twoTone' : theme),
});
});
});
return icons;
}