2

I have an ASP .NET MVC 5 project. The template came with bootstrap, and I have generally left it alone. I now want to use the Bootstrap source as well as Bootswatch variables files for styles. Previously, I have put all the resources needed to build the libraries in to a separate project and written a custom build script, but there must be an easier way. I have found a few related packages, but none provide anything comprehensive.

Are there premade NuGet packages that will set up the two libraries? If not, what do I need to do to get it up-and-running (including automatic build in VS)?

Wasabi Fan
  • 1,763
  • 3
  • 22
  • 36
  • possible duplicate of http://stackoverflow.com/questions/21839351/is-there-a-walkthrough-for-implementing-a-theme-from-bootswatch-or-wrapbootstrap/21864499#21864499 – Carrie Kendall Dec 10 '14 at 15:37
  • If you want to compile less, you can use a task runner (like grunt or gulp) or check out web essentials. Keep in mind that node and task runner support are built into VS15 so it might be a better investment to go that route. – Carrie Kendall Dec 10 '14 at 15:41

1 Answers1

1

Depending on the setup of your project, it may be better to get your Bootstrap-specific CSS from a CDN, even if using MVC.

Check Bootstrap CDN as well as their Bootswatch resources for quick easy usage:

<!-- Default Theme -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />

<!-- if you wanted Amelia, use this instead: -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootswatch/3.1.1/amelia/bootstrap.min.css" />
Ron DeFreitas
  • 629
  • 3
  • 12