You should use either: a gazebo settings file or a processor such as gulp or webpack:
Option 1: Bower Configuration
docs: https://bower.io/docs/config/
in short. you can create a .bowerrc file using { directory": "wwwroot/bower_components" } .
Now, if you bower install your dependencies, they will add them to wwwroot / bower_components.
For large projects with SEO support, option2 is preferable:
Option 2: Processing
you can use tools like gulp to minimize files before adding them to wwwroot.
It adds an extra step / complexity. but the advantage in smaller files (minimization) + you copy only what you need, the result is a smaller published package.
in gulpfile.js you can do something like this:
var gulp = require('gulp'); var bower = require("./bower.json"); gulp.task("copy", function() { var resources = bower.webResources; var tasks = resources.map(function(resource) { return gulp.src("./bower_components/" + resource) .pipe(gulp.dest('./wwwroot/lib/'));
and then you can add a list of webResources to your bower.json to determine what you need to copy:
"webResources": [ //bootstrap example, with globbing "bootstrap/dist/**/@(bootstrap.css|glyphicons-halflings-regular.*|bootstrap.js)", ]
Recommended Use of Webpack2
You can use webpack2 to combine all the dependencies on the Internet: Javascript, css, fonts, images into a single javascript file.
Downsides: * This will increase build time since webpack will now have to be compiled. (Pro: you can use devserver to build on demand). * Delta updates will be less effective
Pro: * You get one file as a dependency * You can use the latest javascript / typescript functions and drag and scale to make it work in every browser.