summaryrefslogtreecommitdiffstats
path: root/docs/modules/ROOT/pages/prerequisites.adoc
blob: a4f4df2794ad3f946b7c2998b86f94090d0a3c09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
= UI Development Prerequisites
ifndef::env-site,env-github[]
include::_attributes.adoc[]
endif::[]
// Settings:
:idprefix:
:idseparator: -
// URIs:
:url-nvm: https://github.com/creationix/nvm
:url-node: https://nodejs.org
:url-gulp: http://gulpjs.com
:url-yarn: https://yarnpkg.com
:url-git: https://git-scm.com
:url-git-dl: {url-git}/downloads
:url-node-releases: https://nodejs.org/en/about/releases/
// These prerequisite instructions are less detailed than Antora's prerequisite instructions, I don't know if this is a concern or not.

An Antora UI project is based on tools built atop Node.js (aka Node), namely:

* {url-node}[Node] (command: `node`)
 ** {url-nvm}[nvm] (optional, but strongly recommended)
* {url-gulp}[Gulp] (command: `gulp`)
* {url-yarn}[Yarn] (command: `yarn`)

You also need {url-git}[git] (command: `git`) to pull down the project and push updates to it.

== git

First, make sure you have git installed.

 $ git --version

If not, {url-git-dl}[download and install] the git package for your system.

== Node

You need Node installed on your machine to use Antora, including the default UI.
Antora follows Node's release schedule, so we advise that you choose an active long term support (LTS) release of Node.
We recommend using the latest active Node LTS version.
While you can use other versions of Node, Antora is only tested against LTS releases.

To check whether you have Node installed, and which version, open a terminal and type:

 $ node --version

You should see a version string, such as:

 v10.14.2

If the command fails with an error, it means you don't have Node installed.
The best way to install Node is to use nvm (Node Version Manager).
Refer to xref:antora:install:linux-requirements.adoc#install-nvm[Install nvm and Node (Linux)], xref:antora:install:macos-requirements.adoc#install-nvm[Install nvm and Node (macOS)], or xref:antora:install:windows-requirements.adoc#install-nvm[Install nvm and Node (Windows)] for instructions.

Once you have Node installed, you can proceed with installing Gulp's CLI and Yarn.

== Gulp CLI

Next, you'll need the Gulp CLI (aka wrapper).
This package provides the `gulp` command which executes the version of Gulp declared by the project.
You should install the Gulp CLI globally (which resolves to a location in your user directory if you're using nvm) using the following command:

 $ npm install -g gulp-cli

== Yarn

Finally, you'll need Yarn, which is the preferred package manager for the Node ecosystem.
You'll need to use the `npm` command to install Yarn, though this is the last time you'll use the `npm` command.
You should install Yarn globally (which resolves to a location in your user directory if you're using nvm) using the following command:

 $ npm install -g yarn

Verify Yarn is installed by checking the version:

 $ yarn --version

Now that you have Node, Yarn, and Gulp installed, you're ready to set up the project.