Closed alajmo closed 9 years ago
What Slush generator did you use? The gulp-install
plugin calls the bower
binary directly, so if that doesn't read the .bowerrc
file then there's an issue with Bower itself or the file is in the wrong directory.
@samiralajmovic by default, gulp's glob doesn't include the files starting with dots. Make sure you include them on you gulp task:
gulp.src(__dirname + '/templates/app/**', { dot: true })
I had this exact same issue before. Hope that works for you.
I constructed my own slush generator, the .bowerrc file is in the template folder, like the other files. For instance, if I do bower install manually from terminal and I have the .bowerrc file with
{ "directory": "./demo/bower_components" }
or without the dot:
{ "directory": "demo/bower_components" }
It will install the folder in the demo folder. However, when I do "slush demo_module" from the terminal and the same .bowerrc file is placed in the template folder of a slush module, it simply overwrites the .bowerrc file as:
{ "directory": "bower_components" }
@lucasmotta solution worked though, I simply edited following line in the slushfile.js to include { dot: true }:
gulp.src(__dirname + '/templates/**', {dot: true})
Awesome job mate!
I tried scaffolding using bower and it works great, however, it doesn't seem to read the .bowerrc, as I always put my bower_components in my app folder. Now it installs the bower components in the root folder.