0

In my index.html file, I've added that:

 <!-- bower:js --> <!-- endbower --> 

in order to let install-bower grunt task to put all my Bower dependencies. In my Gruntfile.js, I have the following task:

 'bower-install': { dist: { html: 'cwf/index.html' } } 

At the end, in my index.html, I get something like:

 <!-- bower:js --> <script src="bower_components/jquery/jquery.js"></script> <script src="bower_components/angular/angular.js"></script> ... <!-- endbower --> 

However, I want to configure the task to prepend ../ before the bower_components, so to get that:

 <!-- bower:js --> <script src="../bower_components/jquery/jquery.js"></script> <script src="../bower_components/angular/angular.js"></script> ... <!-- endbower --> 

How can I configure the task for that purpose?

2
  • As you did not accept the answerr below, am I right in assuming that you haven't found a statisfying solution to the issue yet? Commented Jun 26, 2014 at 7:14
  • That's perfectly right, @user2422960 Commented Jun 26, 2014 at 7:44

1 Answer 1

5

create a file named: .bowerrc within the where your bower.json is located at. That's how you can configure your bower.

Add the property directory, to specify the download path for the components.

Content of the .bowerrc

{ "directory": "../yourCustomPath/" } 
Sign up to request clarification or add additional context in comments.

3 Comments

This configuration will also move the bower_components outside my project (at the parent dir.). I don't want that in fact. I really prefer to configure the bower-install Grunt task instead of Bower itself...
then make it "./components" or something. The property is a folder path "../" make it point to parent.
Why is this not possible from bower.json ??

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.