-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grunt-bower-task is the wrong way #1
Comments
Cons:
|
thx @edy . We could solve this issue by creating a symlink instead of copying the entire directory. |
We are running into the same/similar problem. As it appears only part of the bootstrap files are being copied over through grunt-bower-task specifically only files listed in the bootstrap's package.json "main" section:
This leaves out access to the /dist/css/bootstrap-theme.css files, as well as modifying the directory structure. Not sure if this is directly with the generator or with grunt-bower-task directly. |
My 'old' grunt-bower-task is like this https://github.com/hellowin/sails-bower-task/blob/master/bower.js. I created that just in short term for Bootstrap's file structure handling, because until today I don't get any error beside Bootstrap. It's old because I'm not maintained it well, just for my daily use. But I agree with edy, put I think using grunt-bower-task is a good way, but keep in mind to create |
Thx. I'll try it. |
You are welcome. I wonder is smies still watching this repo? It's true that the implementation of |
If anyone has the same issue, this is the right "exportsOverride" of the bower.json to install bootstrap correctly : "exportsOverride": {
"bootstrap": {
"js": "dist/js/*.min.*",
"css": "dist/css/*.min.*",
"fonts": "dist/fonts/*.*"
}
} |
Hey @smies
Thank you for this generator.
I tried it and it works well, but the underlying grunt-bower-task just doesn't work in the real world.
The reason for that is not the grunt-bower-task, but the fact that people have different understandings of the bower.json file.
Example: Bootstrap
Installing bootstrap with grunt-bower-task will create the following Directory:
Directory:
assets/vendor/bootstrap
This is just one example why the grunt-bower-task is just not usable.
Proposal: Using bower with sails.js
1. Create a
.bowerrc
file.This tells bower to install all components in the assets folder.
2. Add extra clean task
File:
tasks/config/clean.js
3. Modify
grunt prod
taskWe don't want to deploy entire git repos to production.
File:
tasks/config/clean.js
4. Exclude
assets/bower_components
from the watch taskPros/Cons
Pros
Cons
What do you think of this approach?
The text was updated successfully, but these errors were encountered: