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:
root
folder and create a new file named bower.json
..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.
bower.json
file:{ "name": "conference-api", "version": "0.0.1", "dependencies": { "purecss": "~0.5.0" } }
bower install
As we can see, we will be using the Pure CSS framework to handle our frontend code inside our templates.
public
folder, inside the application root, you can see the bower_components
folder created with our Pure CSS package. You can name the directory as you like. For this example, the name bower_components
is very appropriate, as shown in the following screenshot:bower install responsiveboilerplate#2.3.2 --save
Note that command will install a specific version of the framework and then save the dependency in our bower.json
file.
3.144.17.137