migliori / universal-icon-picker

Vanilla JS Icon Picker for any Icon Library
https://universal-icon-picker.miglisoft.com
MIT License
78 stars 9 forks source link

Npm package not found #2

Closed jay2success closed 1 year ago

jay2success commented 1 year ago

Hello,

Thanks for this package. I try to install from npm but its not found Here is the error: @migliori/universal-icon-picker is not in the npm registry, or you have no permission to fetch it.

Please help to fix it. Thanks.

migliori commented 1 year ago

Hello,

Thanks for reporting. It was a real challenge to publish the package on npm, due to this npm bug.

Now it's ok: https://www.npmjs.com/package/@migliori/universal-icon-picker

jay2success commented 1 year ago

Hello,

Thanks for resolving the issue very quickly.

I have other question: I tested using font awesome 6 css and it's not working if i don't set the iconLibraries option. So it seems it needs font list json to list the icon, what is the font css used for? for styling? How do i get font awesome 6 newest json?

Thanks. Regards

On Fri, Nov 18, 2022 at 5:21 PM Gilles Migliori @.***> wrote:

Hello,

Thanks for reporting. It was a real challenge to publish the package on npm, due to this npm bug https://github.com/npm/cli/issues/1654.

Now it's ok: @.***/universal-icon-picker

— Reply to this email directly, view it on GitHub https://github.com/migliori/universal-icon-picker/issues/2#issuecomment-1319806783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOAK4BGEDFBPWTUBENSC4XLWI5KDJANCNFSM6AAAAAASEEW2WA . You are receiving this because you authored the thread.Message ID: @.***>

migliori commented 1 year ago

what is the font css used for?

It's used to load the fonts css on your page. Leave empty if your page already loads them (no need to load them twice, I'll add this to the documentation)

How do i get font awesome 6 newest json?

The iconLibraries option is required, and it loads the icons from the JSON file. To get the latest version of Fontawesome, open /tools/fontawesome-icons-list.html in your browser.

It retrieves the icon list from the Fontawesome API. You can edit the code to choose the Fontawesome version:

// set the fontawesome version version here
const fontawesomeVersion = '6.0.0';

(I'll add this to the doc. too :-)

jay2success commented 1 year ago

Hello,

Thanks for your reply. Great job for providing tools to get the latest json. I tested the tools and the result is having different format than the default font-awesome.json

The result is like this: { "solid": [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "address-book",

while the default "font-awesome.json" is like this { "solid": { "prefix": "fa-solid fa-", "icon-style": "fa-solid", "list-icon": "fa-solid fa-font-awesome", "icons": [ "turn-up", "hand-holding-medical", "graduation-cap", "video",

Can i save the result provided by the tools directly into json file? or should i match the json format like the default one ?

Thanks again.

migliori commented 1 year ago

You must keep the structure of the iconpicker json file, else it won't work.