tiesont / Font.Awesome.Packages

Repo for the Font.Awesome NuGet packages
MIT License
5 stars 1 forks source link

Add non full framework usage to Readme.md #6

Closed smack0007 closed 4 years ago

smack0007 commented 4 years ago

Hello tiesont,

I'm using this package in my WasmWrangler project but I also saw this issue so I thought I would add an explanation about how to use the package for non ASP.NET full framework projects.

tiesont commented 4 years ago

Interesting. Is that the official way of accomplishing .NET + .NET Core compatibility? I'd like to update the packages to "just work," if I can. I might have to look into how Bootstrap manages this.

Of course, Font Awesome Free is probably also available through libman, so...

smack0007 commented 4 years ago

I also just so happened to be looking into the Bootstrap NuGet package today and their package just works. One of the main differences I noticed is in the naming of the first content directory. In your packages the structure is:

Content\Content\**

And in their package the structure is:

content\Content\** 

Notice how the first content is lowercase. Maybe the solution is that simple? Either way in my case I only want to pick out the files that I need (see here). That use case might also be worth documenting.

tiesont commented 4 years ago

It actually looks like I would just need to add a contentFiles root, and then setup the wwwroot/libs/fontawesome path from there. This kind of explains it: https://devblogs.microsoft.com/nuget/nuget-contentfiles-demystified/

This is what the package would look like:

fontawsome-package

That would allow this package to drop it's files in the same location as libman, so it would be a consistent location if someone choose to switch at some point.

tiesont commented 4 years ago

Yep, that seems to work. This is from a throw-away project I just created:

fontawsome-package-installed

tiesont commented 4 years ago

To circle back around to your update - probably worth adding as a "to customize where your files go" option. Or... maybe I just create a new package for ASP.NET Core. Yeah. That's probably best. So, maybe just edit that to say "in non ASP.NET projects"? I'll add the ASP.NET Core version later this week.

smack0007 commented 4 years ago

I updated the text. Feel free to only cherry pick the last commit.