question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

proposal: add option to load custom icons from external sources

See original GitHub issue

We are trying (@antfu and me) to make a universal toolkit to share some logic to allow load svg icons from any source on unocss and unplugin-icons.

Instead creating a shared repo to use it on both projects, I think the better place will be here: this way you can also use it for testing before adding new collections or new icons to existing collections.

The logic to be included here, right now, is only supported on unplugin-icons:

  • load from external sources (network or filesystem): currently only built-in support for filesystem with optional transform callback for all icons
  • load from inline sources: all collections and their icons on the configuration

The main problem here is that all collection/icon loading logic is not asynchronous:

On unplugin-icons we load the collections/icons using async tasks:

/cc @cyberalien

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
cyberaliencommented, Dec 9, 2021

Sure, that can be done.

However, I have few concerns:

  1. If types are to be added to utils, there should be code that works with those types, so functions that use it should be added as well.
  2. Utils should not have any dependencies, except for types. It is meant to be a package that can be used in any environment. Helper functions such as camelize and pascalize can be added to utils. Awaitable type can be imported. Node specific functions, such as ones that work with file system, should be isolated in separate files to make sure they are not imported by accident.
1reaction
cyberaliencommented, Dec 9, 2021

I’ve just made new branch dev/more-utils from master

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Icons · Issue #12 · antfu/unplugin-icons - GitHub
After thinking about it, I would propose to add one configuration key customCollections (or ... Then import icons by placing this in your...
Read more >
Custom Icons (Pro) - Elementor
Upload your own custom icons to your website using Elementor Pro's Custom Icons feature. You can use Fontello, Icomoon, or Fontastic for the...
Read more >
How To Use Custom SVG Icons in Angular Material
Step 1 — Creating an Angular Project and Installing Dependencies. First, open your terminal and create a new project directory: mkdir angular- ...
Read more >
How I Made an Icon System Out of CSS Custom Properties
The SVG source code is compiled with the Sass function that encodes them in data URI and then stores the icons in CSS...
Read more >
How do I get more icons in PowerPoint? - PPT Productivity
To access PowerPoint icons, navigate to the 'Insert' tab, click 'Pictures' then select 'Stock images' from the dropdown menu. Insert Icons into ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found