# Control js order

**URL:** https://discourse.roots.io/t/control-js-order/6631
**Category:** sage
**Created:** 2016-05-03T09:47:16Z
**Posts:** 4

## Post 1 by @dandin84 — 2016-05-03T09:47:16Z

Hi,

i would like to add carousel swipe bootstrap with bower. it depends of course on bootstrap carousel.

the problem is that it added to main.js but before bootstrap instead of after so i get errors says that bootstrap carousel is missing.

i tried to switch places / make overrides in the bower.json but its like shot in the dark.

what i am missing here? how can i control the js order?

thanks

---

## Post 2 by @dandin84 — 2016-05-03T12:24:48Z

i found the answer, thank you :slight_smile:

---

## Post 3 by @ben — 2016-05-03T14:41:40Z

Well, what’s the answer?

---

## Post 4 by @dandin84 — 2016-05-03T15:37:12Z

i didn’t know about the “dependencies” property…

i found the answer here after some research:

> [@Possible reordering of main.css and main.js rendering](https://discourse.roots.io/t/possible-reordering-of-main-css-and-main-js-rendering/4102/14):
>
> @govnaah nevermind got it working… it resumes to what @austin suggested: overriding jasny-bootstrap main and dependencies "overrides": { "modernizr": { "main": "./modernizr.js" }, "jasny-bootstrap": { "main": ["./dist/css/jasny-bootstrap.css", "./dist/js/jasny-bootstrap.js"], "dependencies": { "jquery": "\>= 1.9.0", "bootstrap-sass-official": "3.3.5" } }
