Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Улучшить выгрузку svg #2

Open
yarastqt opened this issue Aug 2, 2021 · 0 comments
Open

Улучшить выгрузку svg #2

yarastqt opened this issue Aug 2, 2021 · 0 comments

Comments

@yarastqt
Copy link
Member

yarastqt commented Aug 2, 2021

Описание

Сейчас каждый ресурс выгружается последовательно из-за этого время ожидания увеличивается с добавлением новых элементов:

for (const [id, url] of urls) {
const component = components.get(id)!
const source = await fetchSvgSource(url)
const jsx = convertSvgToJsx(source, component.name)
await Promise.all([
writeSvgFile(`${component.name}.tsx`, jsx),
writeSvgFile(`${component.name}.svg`, source),
])
console.log('❯ Component fetched and created:', `${component.name}`)
}

Необходимо добавить параллельную выгрузку ресурсов, чтобы сократить время на выполнение.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant