Bootstrap 4 Cookbook
上QQ阅读APP看书,第一时间看更新

Getting ready

To get ready, download the starter code for this chapter, and refer to this chapter's starter code in the folder titled chapter03-start. Open the app/partial/_nav.ejs file, which is already saved with its final code. The reason for this is to have a working navbar with links to all the recipes used in this chapter.

Note that when including the .ejs files in HTML, you can just call the filename. There is no need to use the .ejs  extension. You can see plenty of examples of this in the app/partial/_nav.ejs anchor tags.

It is also important to note that our Gruntfile.js is somewhat different than the one in the preceding chapter. This time, you will need to manually run grunt copy to copy all the necessary JS dependencies. However, this needs to be done only once. Then, later on, you need to run grunt copy only when you change your bower_components, which will probably not happen very often.

Also, to compile SCSS into CSS, you can run grunt sass. To both watch and compile changes, you can still use grunt or grunt watch.