When using wiredep in gulp to inject files into index.html, setting devDependencies: true
does not copy files listed in the bower.json "devDependencies":{...}
block over to my build/vendor folder. The file references are injected into index.html, but files are not copied over.
[Gulpfile.js]
...
return gulp.src(config.buildDir + 'index.html')
.pipe($.wiredep.stream({
devDependencies: true,
...
[bower.json]
...
"dependencies": {
"angular": "~1.4.*",
"morris.js": "^0.5.0"
},
"devDependencies": {
"angular-mocks": "~1.4.*",
"angular-bootstrap": "~0.13.3",
"bootstrap": "~3.2.0"
},
...
Thanks in advance.
Solved it.
Although wiredep
was injecting the proper file refs into the html page, the mainBowerFiles
plugin (which is responsible for moving the files) needed to know to to target devDependencies too.
Passing {includeDev: true}
to the mainBowerFiles
constructor did the trick. MainBowerFiles docs
...
return gulp.src($.mainBowerFiles({includeDev: true}),
...