Bower leading frontend dependencies

Bower will take care of all of our frontend dependencies. Of course, it is simpler to just add the CSS and image files directly in the public folder, but we need a scalable application, right? There is nothing better than using Bower to manage frontend dependencies. To install the dependencies, we will perform the following steps:

  1. Go to the root folder and create a new file named bower.json.
  2. Create another file named .bowerrc with the following code:
    {
      "directory": "public/bower_components"
    }

    The behavior of bower.json is very similar to package.json and both use the init command to create the package file. We skip this step, and add our dependencies directly into the file.

  3. Place the following code in the bower.json ...

Get Learning Single-page Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.