0

I am trying to use yeoman, grunt and bower for my AngularJS development on Windows 7. I am using GitBash to run the commands. I did the following steps

  1. Installed node.js (npm --version 1.4.14)
  2. npm install -g yeoman grunt-cli bower
  3. npm install -g generator-angular
  4. cd c:/wamp/www
  5. mkdir test-ang
  6. cd test-ang
  7. yo angular

When the scaffolding process is complete, I always find that my bower_components folder is outside app. Due to this my index.html is displayed without any styles and javascript as they link to "bower_components/bootstrap/dist/css/bootstrap.css". same thing happends for js files too. If I change it to ../bower_components/bootstrap/dist/css/bootstrap.css" in index.html, then things look fine. But doing grunt serve changes the index.html again

I tried to manually move bower_components inside app folder and edit .bowerrc file accordingly, but it did not help either. Also another interesting thing is, if I do the above listed steps in Virtual box ( running CentOs ) at my work machine, then the bower_components folder is automatically inside app folder.

Has anyone faced this before? Any thoughts or help would be appreciated.

user3402821
  • 33
  • 2
  • 5
  • take a look here - http://stackoverflow.com/a/14080568/1163411. PS: You should not move the folder manually! – lowselfesteemsucks Aug 10 '14 at 00:21
  • thanks Ivica. i followed your instructions and the bower_components folder got created inside app. I assume I could delete the original bower_components folder. But I am noticing one more issue now after doing grunt serve. The paths on index.html look like bower_componenbootstrap/dist/css/bootstrap.css instead of the expected bower_components/bootstrap/dist/css/bootstrap.css which breaks the style and js. Is the path getting trimmed somewhere in the code? – user3402821 Aug 10 '14 at 16:50

0 Answers0