Preparing the Environment
Installing Node JS
The first step is to download the 8.11.3 version of NodeJs by clicking here and select the version for your operating system.
For example, if you are using Windows 10 64-bit, select the version for Windows 64-bit Installer. Once the download is complete, just run the installer. Installing on NodeJs is a very simple wizard, where standard options are usually sufficient. Therefore, the installation will not be detailed here.
At the end of the installation, to confirm that NodeJs has been installed correctly, open Command Prompt and type:
node --version
The result must be something like:
v8.11.3
Also, confirm that npm is installed, by typing:
npm --version
The result must be something like:
5.6.0
Installing Git
Go to https://git-scm.com/downloads and select your operating system. For example, if you are using Windows 10 64-bit, click Windows, and then click Git for Windows Setup.
Git installation is a simple wizard, and will not be detailed here. Normally, following the wizard's default options is enough.
To confirm that git was installed correctly, open the command prompt and type:
git --version
The result should look something like (of course, depending on the version and your operating system, the result will be different):
git version 2.18.0.windows.1
Git commands should be widely used in the course of project development. If you need basic help, go to this guide. If you would like to see the official documentation, visit the official website
Installing Visual Studio Code
Go to https://code.visualstudio.com/download, select the desired version according to your operating system, download the installer and run it. The installation wizard is simple, and usually the default options are sufficient. Therefore, this installation will not be detailed here.
Configuring VSCode
Most of the extensions below are totally optional, but are a recommendation of the Jazz core team, as they will help a lot in the flow of development:
- Prettier - Code Formatter
- ESLint
- Nunjucks
To install an extension in the VSCode, select the option of Extensions in the menu on the left side. Enter the name of the extension in the search field, and then click Install. Repeat this process for each extension. It is recommended that you restart the VSCode after installing an extension.
Installing NPM global packages
The NPM or Node Package Manager is the node's package manager. It is installed together with the NodeJs. With it we can manage the node packages installed in a specific project, or on the computer globally. Having a node package installed globally means that it can be run from any directory on the computer.
To install a npm package globally, open Command Prompt and type:
npm install -g <package_name>
For Jazz projects, one makes use of a package that must be installed globally, which is called Nodemon. This package monitors an application and reloads it automatically with each update of the source code. This will allow a much more practical flow of development.
Therefore, to install Nodemon, open the command prompt and type:
npm install -g nodemon
Other packages that are used in product development, and which must be installed globally:
- docusaurus (npm install -g docusaurus)
To learn more about npm, visit the official website with the documentation.