Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Full bower_components folder is included in /dist build #590

Closed
mariokostelac opened this issue Feb 18, 2014 · 7 comments
Closed

Full bower_components folder is included in /dist build #590

mariokostelac opened this issue Feb 18, 2014 · 7 comments

Comments

@mariokostelac
Copy link

I've noticed that we have copy of bower_components in dist folder after running build task. Do we really need it?
I commented out this part of copy task and nothing broke down. Also, I've tried what could go wrong, but didn't find anything.

@jeef3
Copy link

jeef3 commented Feb 25, 2014

Not all Bower components can add themselves correctly via grunt-bower-install, so those components may fail. One example would be FontAwesome.

@mariokostelac
Copy link
Author

Thank you for the answer, I just saw that dist app is huge so I inspected it a bit and realised that bower_components is still there.

@jeef3
Copy link

jeef3 commented Feb 25, 2014

Yeah, ideally (imo) it shouldn't be there. So on a per-project basis, I update my Gruntfile to remove it if possible.

@gion
Copy link

gion commented Feb 26, 2014

Ideally the bower_components folder in the after a build process should contain only the dependencies and not the devDependencies specified in the bower.json file.

@steren
Copy link

steren commented Mar 3, 2014

If I understand correctly, the reason is that not all bower dependencies are correclty added to the index.html and go to the vendor.js minified file?

I find it strange to, by default, leave the bower_component in the dist folder. If a user is using some bower components that cannot be added automatically via grunt-bower-install and minified to vendor.js, them he should specifically add this line to the copygrunt task. But the copy should not copy everything. This increase considerably the size of the dist folder and could trick the user into shipping publicly some non-minified code.

@eddiemonge
Copy link
Member

PR submitted here: #608
Please test it and let me know if it works/doesn't work/you don't like/you do like/etc

@mariokostelac
Copy link
Author

Very interesting. I thought that we should not do it (to be honest, I think
that manually adding components is better option than copying the whole
bower_components dir), but let's wait for guys from generator-webapp to
pull this request.
One thing I am afraid of is the case when it breaks on some other step. Is
there any other case that can make concatenating, minifying... pipeline
impossible?

.mk

On Sat, Mar 8, 2014 at 12:46 AM, Eddie Monge [email protected]:

PR submitted here: #608#608
Please test it and let me know if it works/doesn't work/you don't like/you
do like/etc


Reply to this email directly or view it on GitHubhttps://github.com//issues/590#issuecomment-37080331
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants