stephenplusplus/grunt-wiredep

dependency removed from jade file when running wiredep grunt task

Closed this issue · 1 comments

In my jade file I have the following defined

// bower:js
script(src='bower_components/jquery/dist/jquery.js')
script(src='bower_components/fastclick/lib/fastclick.js')
script(src='bower_components/jquery.cookie/jquery.cookie.js')
script(src='bower_components/velocity/velocity.js')
script(src='bower_components/velocity/velocity.ui.js')
script(src='bower_components/scrollreveal/dist/scrollReveal.js')
script(src='bower_components/bootstrap.dropdown/dropdown.js')
script(src='bower_components/bootstrap.dropdown/dropdown.min.js')
script(src="bower_components/iscroll/build/iscroll.js")
script(src='bower_components/drawer/dist/js/jquery.drawer.js')
script(src='bower_components/drawer/dist/js/jquery.drawer.min.js')
script(src='bower_components/swiper/dist/js/swiper.js')
script(src='bower_components/smoothstate/src/jquery.smoothState.js')
// endbower

However everytime I run grunt wiredep the script(src="bower_components/iscroll/build/iscroll.js") is removed from the jade file.

My grunt wiredep task is defined as follows:

wiredep: {
            target: {
                src: [
                    '<%= app %>/**/*.jade'
                ],
                exclude: [
                    'modernizr',
                    'jquery-placeholder',
                    'foundation'
                ]
            }
        }

I'm not sure what is causing this - below is my bower.json file:

{
  "name": "zf5_project",
  "dependencies": {
    "foundation": "zurb/bower-foundation",
    "velocity": "~1.2.2",
    "scrollreveal": "~2.3.2",
    "drawer": "~2.4.0",
    "iscroll": "~5.1.3",
    "jquery": "2.1.4",
    "compass-mixins": "~1.0.2",
    "swiper": "~3.1.0",
    "jquery-scrollstop": "~1.2.0",
    "smoothstate": "~0.7.2"
  }
}

I just needed to add the following to my .bower.json and it works:

 "overrides": {
    "iscroll": {
      "main": "build/iscroll.js"
    }
}