generator-keystone
generator-keystone copied to clipboard
moving static resources into bower dependencies
I'm already using bower and grunt-wiredep in different projects with keystone. I was wondering if you think that this feature will be useful to the generator i can make a PR for that
It's not a bad idea at all, I've been wondering if we should do this too.
Do the LESS source files for Bootstrap come down from Bower?
I've always had mixed results with bower and usually end up taking whatever files it provides, and moving / modifying them somehow (or just skipping the whole process because I want more control). It does seem to be getting better though, so perhaps worth another look.
Yeah, i'm using it with sass ( work also for less ) and you just need to insert this comment into the your main file
//bower:scss
//endbower
wiredep will take care of that, and if you need more control over it you can specify overrides into your bower.json just like this:
"overrides": {
"slick.js": {
"main": [
"slick/slick.min.js",
"slick/slick.css"
]
}
}
and wiredep will include the main file you have written
@JedWatson You can get less files for Bootstrap from Bower repo. That's what I am doing. Then -> I am simply including them in my main.less file and overwrite when required. It's also better to do that e.g. if you want to use only few features it providers - like grid system.
Alternatively, you can pull Bootstrap in from npm. If you npm install -S bootstrap, it has the Less source files. Or you can do npm install -S bootstrap-sass for the Sass version.
I didn't want to commit Bootstrap's source to my project, and I wanted to use Sass, so I used npm and wired it up with the following changes:
keystone.js:
keystone.init({
// ...
'sass options': {
includePaths: [
'node_modules',
'node_modules/bootstrap-sass/assets/stylesheets'
]
},
// ...
});
public/styles/site.scss
// ...
@import "bootstrap";
// ...
from the bower home page: ...psst! While Bower is maintained, we recommend using Yarn and Webpack for front-end projects