Reputation: 1028
Starting a new Angular project via Yeoman asks if you want to include Twitter Bootstrap (I'm using Sass flavor). Doing so includes both the styles and scripts. However, I want to use UI Bootstrap instead of Bootstrap's scripts (which depend on jQuery).
So, is it possible to install only Bootstrap's styles (preferably in Sass) with Bower? Or do I just need to download and include the Bootstrap styles manually?
Upvotes: 24
Views: 8704
Reputation: 312
if you don't have a bowerInstall task in your gruntfile as mentioned in the accepted answer, this also works in the wiredep task.
wiredep: {
app: {
src: ['<%= yeoman.app %>/index.html'],
exclude: ['bower_components/bootstrap/dist/js/bootstrap.js'],
ignorePath: /\.\.\//
},
Upvotes: 3
Reputation: 52073
Based on this answer, you could add this to .bowerrc
to delete the Bootstrap JS files:
{
"directory": "bower_components",
"scripts": {
"postinstall": "rm -rf bower_components/bootstrap-sass-official/assets/javascripts"
}
}
Upvotes: 3
Reputation: 1953
just add exclude
option in grunt bowerInstall task, and bowerInstall task will not inject the excluded file in the html file
bowerInstall: {
app: {
src: ['<%= yeoman.app %>/index.html'],
exclude: ['bower_components/bootstrap/dist/js/bootstrap.js'],
ignorePath: '<%= yeoman.app %>/'
}
},
Upvotes: 14
Reputation: 14897
I know one CSS-only Bootstrap packages in Bower: bootstrap-css-only
; However it comes with precompiled CSS but not SASS.
Upvotes: 17