Zaid-Ajaj / Femto

Femto is a CLI tool that automatically resolves npm packages used by Fable bindings
153 stars 13 forks source link

How to support package with multiple way of installation? #30

Closed MangelMaxime closed 4 years ago

MangelMaxime commented 5 years ago

If we take Font Awesome as an example, there are several ways to use that package.

  1. Use @fortawesome/fontawesome-free

  2. Use @fortawesome/fontawesome-svg-core and one of the svg package like @fortawesome/free-solid-svg-icons, @fortawesome/free-regular-svg-icons, etc.

MangelMaxime commented 4 years ago

@Zaid-Ajaj Is it something we want to include in Femto scope?

I suppose this is something that can also happen when a package offer a free versionf hosted on npm and another one from a private server. FontAwesome does that for example.

Zaid-Ajaj commented 4 years ago

I think this be solved by introducing a proper package hierarchy:

I think using a private npm registry server is out of scope. For those packages, you have to manually install the dependencies you see when you run femto against the project

MangelMaxime commented 4 years ago

I don't think this is possible to have a proper package hierarchy in the case of FontAwesome.

Or at least not easily and without code duplication. This is probably a really special case because you can use icons from SVG, Font, JavaScript, React bindings, Vue bindings or all at once.

Let's just close this issue for now and see if others package has this need.

The only one know I can think about is Fable.React/Feliz if people want to use a react alternative.

About the pro registry, once the registry is configured you can simply do npm install @fortawesome/angular-fontawesome-pro for example. But yes, let's keep it simple for now and try to improve adoption first. <-- I have some ideas for that and will make an issue for discussing it when ready.

Zaid-Ajaj commented 4 years ago

The only one know I can think about is Fable.React/Feliz if people want to use a react alternative.

Feliz aims to support only React (Preact can be added using webpack aliases but it not priority of Feliz)

I have some ideas for that and will make an issue for discussing it when ready.

I am all ears :smile: