@@ -10,115 +10,133 @@ slug: /faq/docs-installation
10
10
11
11
# Helium Documentation Installation Guide
12
12
13
- ## Node.js
13
+ Clone the docs repo from [ Github ] ( https://github.com/helium/docs ) .
14
14
15
- Download latest software: External link: [ Node.js] ( https://nodejs.org/en/download ) version >=
16
- 10.15.1
17
-
18
- :::info
15
+ ``` bash title="clone the repo"
16
+ $ git clone https://github.com/helium/docs.git
17
+ ```
19
18
20
- Windows Node.js installation you do not need to install the Compiler and Chocolaty dependencies.
19
+ Navigate to the ` docs ` directory
21
20
22
- :::
21
+ ``` bash title="navigate to the docs directory"
22
+ $ cd docs/
23
+ ```
23
24
24
- Install Node.js
25
+ ---
25
26
26
- ## Yarn
27
+ ## Prerequisites
27
28
28
- Download software: External link: [ Yarn ] ( https://yarnpkg.com/getting-started/install ) version >= 1.5
29
+ ### Install Node.js
29
30
30
- After you install Node.js, which will install Node.js and npm as a dependency you can do the
31
- following.
31
+ Download and install the latest version of [ Node.js] ( https://nodejs.org/en/download ) .
32
32
33
+ ``` bash title="Verify the installation."
34
+ $ node --version
35
+ v18.16.0
33
36
```
34
- $ npm install -g yarn
35
37
38
+ :::info
39
+
40
+ Windows users installing Node.js do not need to install the ` Compiler ` nor ` Chocolaty ` dependencies.
41
+
42
+ :::
43
+
44
+ ### Install Yarn
45
+
46
+ After installing Node.js, npm will be installed and can be used to install Yarn.
47
+
48
+ ``` bash title="install yarn"
49
+ $ npm install -g yarn
36
50
> [email protected] preinstall /path/to/npm/node_modules/yarn
37
51
> : ; (node ./preinstall.js > /dev/null 2>&1 || true)
38
52
```
39
53
40
- To upgrade the Yarn version to be >= 1.5 you must set each project directory to version berry.
54
+ To upgrade the Yarn version to be >= 1.5, set the project directory to version ` berry ` .
41
55
42
- ```
43
- $ cd ~/path/to/project
56
+ ``` bash title="set yarn version to berry"
44
57
$ yarn set version berry
45
-
46
- Resolving berry to a url...
47
- Downloading https://github.com/yarnpkg/berry/raw/master/packages/berry-cli/bin/berry.js...
48
- Saving it into /path/to/fork/docs/.yarn/releases\yarn-berry.cjs...
49
- Updating /path/to/prjoect/docs/.yarnrc.yml...
50
- Done!
58
+ ➤ YN0000: Retrieving https://repo.yarnpkg.com/3.5.1/packages/yarnpkg-cli/bin/yarn.js
59
+ ➤ YN0000: Saving the new release in .yarn/releases/yarn-3.5.1.cjs
60
+ ➤ YN0000: Done in 0s 430ms
51
61
```
52
62
53
- Then you can install Yarn which will download and compile all the project module dependencies.
63
+ ### Install Dependencies
54
64
55
- ```
56
- $ yarn install
65
+ Install Yarn which will download and compile all the project module dependencies.
57
66
58
- YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker
59
- ...
60
- YN0007: │ yarn@npm:1.22.10 must be built because it never has been before or the last one failed
61
- YN0007: │ core-js@npm:3.12.1 must be built because it never has been before or the last one failed
62
- YN0007: │ core-js-pure@npm:3.12.1 must be built because it never has been before or the last one failed
63
- YN0000: └ Completed in 42s 725ms
64
- YN0000: Done with warnings in 1m 31s
67
+ ``` bash title="install yarn and dependencies"
68
+ $ yarn install
69
+ ➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
70
+
71
+ ➤ YN0000: ┌ Resolution step
72
+ ...
73
+ ➤ YN0000: └ Completed in 4s 287ms
74
+ ➤ YN0000: ┌ Fetch step
75
+ ...
76
+ ➤ YN0000: └ Completed in 9s 723ms
77
+ ➤ YN0000: ┌ Link step
78
+ ...
79
+ ➤ YN0000: └ Completed in 8s 494ms
80
+ ➤ YN0000: Done with warnings in 22s 635ms
65
81
```
66
82
67
83
Check the final version and confirm that it is >= 1.5
68
84
69
- ```
85
+ ``` bash title="verify yarn version"
70
86
$ yarn --version
71
- 3.0 .1
87
+ 3.5 .1
72
88
```
73
89
74
- ### Local Development
90
+ ---
91
+
92
+ ## Local Development
75
93
76
- ```
94
+ ``` bash title="start the development server"
77
95
$ yarn start
96
+ [INFO] Starting the development server...
97
+ [SUCCESS] Docusaurus website is running at: http://localhost:3000/
78
98
79
- Starting the development server...
80
- Docusaurus website is running at: http://localhost:3000/
99
+ ✔ Client
100
+ Compiled successfully in 25.06s
81
101
82
- √ Client
83
- Compiled successfully in 5.90s
102
+ client (webpack 5.76.3) compiled successfully
84
103
85
- i 「wds」: Project is running at http://localhost:3000/
86
- i 「wds」: webpack output is served from /
87
- i 「wds」: Content not from webpack is served from /path/to/project/docs
88
- i 「wds」: 404s will fallback to /index.html
104
+ ✔ Client
105
+ Compiled successfully in 542.45ms
89
106
90
- * Client ... done (99%) plugins
91
- WebpackDevMiddleware
107
+ client (webpack 5.76.3) compiled successfully
92
108
```
93
109
94
110
This command starts a local development server and open up a browser window. Most changes are
95
111
reflected live without having to restart the server.
96
112
97
- ### Link Checking before your PR
113
+ ### Auto Refresh
114
+
115
+ Each time a file is saved the site will get rebuilt and the pages refreshed on the fly, there is no
116
+ need to keep restarting Yarn.
117
+
118
+ ---
119
+
120
+ ## Link Checking Before Creating a Pull Request
98
121
99
122
Checking links can be accomplished by using the ` yarn build ` command
100
123
101
- ```
124
+ ``` bash title="make production build"
102
125
$ yarn build
126
+ [INFO] [en] Creating an optimized production build...
103
127
104
- [en] Creating an optimized production build...
128
+ ✔ Client
105
129
106
- √ Client
130
+ ✔ Server
131
+ Compiled successfully in 30.22s
107
132
108
- √ Server
109
- Compiled successfully in 1.25m
133
+ bigint: Failed to load bindings, pure JS will be used (try npm run rebuild? )
110
134
111
- √ Client
135
+ ✔ Client
112
136
113
- * Server █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
137
+ ● Server █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
114
138
stored
115
139
116
- Success! Generated static files in build.
117
-
118
- Use `npm run serve` to test your build locally.
140
+ [SUCCESS] Generated static files in " build" .
141
+ [INFO] Use ` npm run serve` command to test your build locally.
119
142
```
120
-
121
- ### Developing
122
-
123
- Each time you save files under your local repo the site will get rebuilt and the pages refreshed on
124
- the fly, there is no need to keep restarting Yarn.
0 commit comments