Skip to content

Commit bbf99f5

Browse files
samgutentagjthiller
authored andcommitted
updated docs contribution instructions
1 parent 5261f0d commit bbf99f5

File tree

1 file changed

+80
-62
lines changed

1 file changed

+80
-62
lines changed

docs/faq/docs-installation.mdx

Lines changed: 80 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -10,115 +10,133 @@ slug: /faq/docs-installation
1010

1111
# Helium Documentation Installation Guide
1212

13-
## Node.js
13+
Clone the docs repo from [Github](https://github.com/helium/docs).
1414

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+
```
1918

20-
Windows Node.js installation you do not need to install the Compiler and Chocolaty dependencies.
19+
Navigate to the `docs` directory
2120

22-
:::
21+
```bash title="navigate to the docs directory"
22+
$ cd docs/
23+
```
2324

24-
Install Node.js
25+
---
2526

26-
## Yarn
27+
## Prerequisites
2728

28-
Download software: External link: [Yarn](https://yarnpkg.com/getting-started/install) version >= 1.5
29+
### Install Node.js
2930

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).
3232

33+
```bash title="Verify the installation."
34+
$ node --version
35+
v18.16.0
3336
```
34-
$ npm install -g yarn
3537

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
3650
> [email protected] preinstall /path/to/npm/node_modules/yarn
3751
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
3852
```
3953

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`.
4155

42-
```
43-
$ cd ~/path/to/project
56+
```bash title="set yarn version to berry"
4457
$ 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
5161
```
5262

53-
Then you can install Yarn which will download and compile all the project module dependencies.
63+
### Install Dependencies
5464

55-
```
56-
$ yarn install
65+
Install Yarn which will download and compile all the project module dependencies.
5766

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
6581
```
6682

6783
Check the final version and confirm that it is >= 1.5
6884

69-
```
85+
```bash title="verify yarn version"
7086
$ yarn --version
71-
3.0.1
87+
3.5.1
7288
```
7389

74-
### Local Development
90+
---
91+
92+
## Local Development
7593

76-
```
94+
```bash title="start the development server"
7795
$ yarn start
96+
[INFO] Starting the development server...
97+
[SUCCESS] Docusaurus website is running at: http://localhost:3000/
7898

79-
Starting the development server...
80-
Docusaurus website is running at: http://localhost:3000/
99+
✔ Client
100+
Compiled successfully in 25.06s
81101

82-
√ Client
83-
Compiled successfully in 5.90s
102+
client (webpack 5.76.3) compiled successfully
84103

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
89106

90-
* Client ... done (99%) plugins
91-
WebpackDevMiddleware
107+
client (webpack 5.76.3) compiled successfully
92108
```
93109

94110
This command starts a local development server and open up a browser window. Most changes are
95111
reflected live without having to restart the server.
96112

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
98121

99122
Checking links can be accomplished by using the `yarn build` command
100123

101-
```
124+
```bash title="make production build"
102125
$ yarn build
126+
[INFO] [en] Creating an optimized production build...
103127

104-
[en] Creating an optimized production build...
128+
✔ Client
105129

106-
√ Client
130+
✔ Server
131+
Compiled successfully in 30.22s
107132

108-
√ Server
109-
Compiled successfully in 1.25m
133+
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
110134

111-
Client
135+
Client
112136

113-
* Server █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
137+
Server █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
114138
stored
115139

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.
119142
```
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

Comments
 (0)