I have successfully included bootstrap-jasny via bower
bower install jasny-bootstrap --save
it shows up in the /dist/main.css file alright, but it is added before the bootstrap css and before the bootstrap js.
jasny-boostrap requires that it is added after bootstrap.
I was hoping to get help to change the order of the main.css and main.js output if possible.
You can import
jasny-bootstrap.less after you have imported Bootstrap.
@martinvd that did the trick.
Now, its getting complied twice. via bower dependancies and now the import.
I’m thinking the file size can be optimised further if it was included once. Am i better off including it via third-party method? and ignore the bower.json totally. (sorry if its an obvious question, i just like to be sure its a good way to achieve my purpose)
Maybe you are running into this error?
Can you try that out and see if it fixes it?
@austin, so here is what i did with the link you sent.
I replaced my gulpfile.js with the one found in the link,
I added ‘gulp-order’ to my package.json
jasny-boostrap is still added before the
bootstrap as seen in the
Did I do something wrong in implementing the changes from the link?
I would recommend using overrides in the bower.json to point jasny’s scss source files:
That way it will be compiled in the correct order when main.scss is compiled.
You could also just import the css file manually and tell it not to load the css file using the bower overrides.
Also send positive vibes to all of these issues to get them merged:
Here’s an example bower.json that should work:
This file has been truncated.
"Ben Word <firstname.lastname@example.org>"
@austin, that worked great.
Minor problem was that some elements (such as dropdown) were not working due to
jasny-bootstap.js still loading before
Thank you very much Sir.
I also noticed bootstrap js driven component such as modal is also not working properly (out of the box). i have to initiate that also.
jasny-bootstrap.js is still being added before
bootstrap.js in the
main.js is there a possible fix?
I have been trying my hands on it with my little knowledge but no solutions yet.
@govnaah oh you know what? It looks like jasny bootstrap is relying on bootstrap and not bootstrap-sass. That’s why it can’t figure out the order.
In that same overrides try overriding the “dependencies” property to require jquery and bootstrap-sass
@austin that absolutely solves the problem.
Thank you so much sir.
@govnaah, could you please post your working code? thanks in advance.
Been trying with no success…
@govnaah nevermind got it working… it resumes to what @austin suggested:
"jquery": ">= 1.9.0",
@promptdev, i didn’t see this in time.
Glad you got it working too.