Conventions
In this book, various font styles are used to differentiate between different types of information. Here are some examples of these styles, and an explanation of their meaning:
When referring to a short piece of information that relates to the code examples, like a variable or property name, or file or directory name, we'll use a light mono-space font:
"Based on this task, we notice that each file
in the files
array contains src
and dest
properties."
When referring to a large piece of information that relates to the code examples, like a portion of code, the contents of a file or the output from the command-line interface, we use black mono-space font:
grunt.initConfig({ stringCheck: { file: './src/app.js', string: 'console.log(' } });
When referring to portion code in code, we note the example number and name at the top in a JavaScript comment (that is, text beginning with //
).
When specifying user command line input among the command-line output, using Unix bash convention, we prepend a dollar symbol so we know what is input and what is output:
$ echo "hello world" hello world
When referring to new terms and important words, we display them in bold.
When conveying a URL, we'll prefix the text with "http://
" and use a mono-space font. This book's homepage (http://gswg.io/) is used as a URL shortener and as an intermediary in case URLs need to be updated. For example:
"For more information, see the Grunt Website at http://gswg.io#grunt."