Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended way to include javascript and css in a nupkg

I have a nuget package that provides frontend as well as backend code.

Usually I'd use the content folder in my nuget structure to distribute javascript and css files to the clients.

Now, with aspnet5, the recommended way to install frontend dependencies is to use bower or npm.

My nuget package makes no sense as a standalone .net package nor as a js+css package. It'd be great if I could just add a dependency to my package and have it working.

What's the recommended way to achieve this?

Edit:

As @VictorHurdugaci said, Nuget is not a great delivery mechanism for frontend dependencies. But I need a way to build a cohesive package that my clients install it and "just works (tm)".

I could use bower, but then I'd have to remember to add the dependency to my bower.json and keep them in sync with my nupkg.

Using bower, or npm, is there a way to pack it all in a single "artifact" for clients to use?

like image 597
Dalsier Avatar asked Dec 16 '15 17:12

Dalsier


1 Answers

Nuget is not a great delivery mechanism for client side assets. Use Bower or something similar instead.

like image 119
Victor Hurdugaci Avatar answered Nov 27 '22 22:11

Victor Hurdugaci