Setting up frontend dependencies through bower

The very first step is to utilize Bower, the package manager for frontend JavaScript projects, to pull in the dependencies of our project.

We need to create a directory src/frontend, and place a bower.json file into it with the following contents:

   "name": "keyword-wrangler-client",
   "dependencies": {
     "angular": "1.3.15",
     "angular-route": "1.3.15",
     "angular-grid": "2.0.14",
     "restangular": "1.4.0",
     "bootstrap": "3.3.4", "async": "0.9.2"
   }, "analytics": false

Then, while in folder keyword-wrangler/src/frontend, run:

$ ../../node_modules/.bin/bower install

This will install all dependencies into src/frontend/bower_components.

Get The Node Craftsman Book now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.