I am new to Yeoman/Grunt/Bower. I have a bower.json
file that defines the following dependencies:
bower.json
{
\"
Minified versions of the JavaScript libraries you're using will eventually not be shipped with Bower modules. Minifying and concatenating is not something the package manager is responsible for, but your build pipeline.
With Yeoman, the recommended way is to use grunt-usemin, which will take care of all the necessary steps. You can see an example of this when scaffolding out a new app with yo webapp
and taking a look at the generated Gruntfile.js
and index.html
.
In your case, you would need to add a comment around your script includes:
And make sure to have the corresponding usemin tasks in your Grunt pipeline:
useminPrepare: {
options: {
dest: 'dist'
},
html: 'app/index.html'
},
usemin: {
options: {
dirs: ['dist']
},
html: ['dist/{,*/}*.html'],
css: ['dist/styles/{,*/}*.css']
},