Skip to content
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

Why do Bootstrap plugins get built as a separate file? #590

Closed
silvenon opened this issue Nov 5, 2016 · 9 comments
Closed

Why do Bootstrap plugins get built as a separate file? #590

silvenon opened this issue Nov 5, 2016 · 9 comments
Labels

Comments

@silvenon
Copy link
Member

silvenon commented Nov 5, 2016

Seems like we could save an HTTP request there, if I'm not missing something.

@neilhem
Copy link
Collaborator

neilhem commented Nov 7, 2016

You mean bootstrap's built-in js plugins? The way how they are inserted into html file?

@silvenon
Copy link
Member Author

silvenon commented Nov 8, 2016

@neilhem yeah, Bootstrap's JS plugins are inserted into a separate useref comment block, but it could just as well be a part of the vendor.js comment block, which would save an HTTP request.

Now that I think about it, I remember I wanted to change it previously, but it was tricky…

@neilhem
Copy link
Collaborator

neilhem commented Nov 8, 2016

Maybe we should remove integration with boostrap plugins on generator bootstrap & include them via wiredep

@silvenon
Copy link
Member Author

silvenon commented Nov 9, 2016

@neilhem good idea!

@illycz
Copy link
Contributor

illycz commented Feb 18, 2017

What is the "right" solution for now, if I don't want another request?

Thanks

@silvenon
Copy link
Member Author

silvenon commented Feb 18, 2017

One way is to include them all in the vendor.js block:

<!-- build:js scripts/vendor.js -->
<!-- bower:js -->
<!-- endbower -->
<!-- insert Bootstrap plugins here -->
<!-- endbuild -->

@illycz
Copy link
Contributor

illycz commented Feb 18, 2017

wiredep remove this hardcoded files in next running... :(

@neilhem
Copy link
Collaborator

neilhem commented Feb 19, 2017

Wiredep removes everything between

<!-- bower:js -->wiredep injected scripts here<!-- endbower -->

Scripts which you don't want to be affected by wiredep you should put like this:

<!-- build:js scripts/vendor.js -->
<!-- bower:js -->
<!-- endbower -->
wiredep will not update these scripts
<!-- endbuild -->

@UlisesGascon
Copy link
Member

I assume that this bug was fixed in #737. If not we can re-open it again 😃

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

No branches or pull requests

4 participants