Search code examples
javascripttwitter-bootstrapsassgulpgulp-sass

Bootstrap JavaScript with Gulp


I'm new to gulp and want to add bootstrap to my project. I already added SASS Bootstrap. That was no problem because I found a good documentation. Now I also need to add the javascript of bootstrap to my project. I tried to follow this documentation and added just the API to my index.html at the end of my body. Like this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>

But I wont work. Do I have to include the bootstrap.js in an extra js? Just like I importet bootstrap.sass to my main.sass?

I can't find a good documentation and don't know what to do now.


Solution

  • Yes, you have to import bootstrap.js as well. It is important that you import that in the head of your HTML.