@@ -61,14 +61,15 @@ dart --version
61
61
62
62
#### Node.js
63
63
64
- The latest stable LTS release of Node.js is required to build the site.
64
+ The ** latest** stable LTS release of Node.js is required to build the site.
65
65
If you don't have Node.js or need to update, download your
66
66
computer's corresponding version and follow the instructions
67
67
from the [ Node.js download archive] [ ] .
68
- If you prefer, you can use a version manager such as [ nvm] [ ] .
68
+ If you prefer, you can use a version manager such as [ nvm] [ ] ,
69
+ and run ` nvm install ` from the repository's root directory.
69
70
70
71
If you already have Node installed, verify it's available on your path
71
- and already the latest stable version _ (` 20 ` or later)_ :
72
+ and already the latest stable version _ (currently ` 20.10 ` or later)_ :
72
73
73
74
``` terminal
74
75
node --version
@@ -137,60 +138,72 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
137
138
dart pub get
138
139
```
139
140
140
- 3 . From the root directory of the repository,
141
- enable [ ` corepack ` ] [ ] to set up [ ` pnpm ` ] [ ] .
142
- ` corepack ` comes bundled with Node and ` pnpm `
143
- is an alternative, efficient package manager for npm packages.
144
- If you already have ` pnpm ` installed or installed it a different way,
145
- you can skip the ` corepack ` commands.
141
+ 3 . Install [ ` pnpm ` ] [ ] using your preferred [ installation method] [ pnpm-install ] .
142
+ ` pnpm ` is an alternative, efficient package manager for npm packages.
143
+ If you already have ` pnpm ` , verify you have the latest stable version.
144
+ We recommend using [ ` corepack ` ] [ ] to install and manage ` pnpm ` versions,
145
+ since it is bundled with most installations of Node.
146
+
147
+ If you haven't used ` corepack ` before, you'll need to
148
+ first enable it with ` corepack enable ` .
149
+ Then, to install the correct ` pnpm ` version, from the
150
+ root directory of the repository, run ` corepack install ` :
146
151
147
152
``` terminal
148
153
corepack enable
149
154
corepack install
150
155
```
151
156
152
157
4 . Once you have ` pnpm ` installed and setup,
153
- fetch the site's npm dependencies.
154
- We recommend you use ` pnpm ` , but you can also use ` npm ` .
158
+ fetch the site's npm dependencies using ` pnpm install ` .
159
+ We highly recommend you use ` pnpm ` , but you can also use ` npm ` .
155
160
156
161
``` terminal
157
162
pnpm install
158
163
```
159
164
160
- 5 . From the root directory, serve the site locally.
165
+ 5 . From the root directory, run the ` dash_site ` tool to
166
+ validate your setup and learn about the available commands.
167
+
168
+ ``` terminal
169
+ ./dash_site --help
170
+ ```
171
+
172
+ 6 . From the root directory, serve the site locally.
161
173
162
174
``` terminal
163
- dart run dart_site serve
175
+ ./dash_site serve
164
176
```
165
177
166
178
This command generates and serves the site on a
167
179
local port that's printed to your terminal.
168
180
169
- 6 . View your changes in the browser by navigating to < http://localhost:4000 > .
181
+ 7 . View your changes in the browser by navigating to < http://localhost:4000 > .
170
182
171
183
Note the port might be different if ` 4000 ` is taken.
172
184
173
- To instead view the source of generated site files ,
174
- check the ` _site ` directory.
185
+ If you want to check the raw, generated HTML output and structure ,
186
+ view the ` _site ` directory in a file explorer or an IDE .
175
187
176
- 7 . Make your changes to the local repo.
188
+ 8 . Make your changes to the local repo.
177
189
178
190
The site should automatically rebuild on most changes, but if
179
191
something doesn't update, exit the process and rerun the command.
180
192
Improvements to this functionality are planned.
181
193
Please open a new issue to track the issue if this occurs.
182
194
183
- 8 . Commit your changes to the branch and submit your PR.
195
+ 9 . Commit your changes to the branch and submit your PR.
184
196
185
197
If your change is large, or you'd like to test it,
186
198
consider [ validating your changes] ( #validate-your-changes ) .
187
199
188
200
> [ !TIP]
189
201
> To find additional commands that you can run,
190
- > run ` dart run dart_site --help` from the repository's root directory.
202
+ > run ` ./dash_site --help` from the repository's root directory.
191
203
192
204
[ `corepack` ] : https://nodejs.org/api/corepack.html
193
205
[ `pnpm` ] : https://pnpm.io/
206
+ [ pnpm-install ] : https://pnpm.io/installation
194
207
195
208
## Validate your changes
196
209
@@ -201,7 +214,7 @@ commit your work, then run the following command to
201
214
verify it is up to date and matches the site standards.
202
215
203
216
``` terminal
204
- dart run dart_site check-all
217
+ ./dash_site check-all
205
218
```
206
219
207
220
If this script reports any errors or warnings,
@@ -241,7 +254,7 @@ you can build a full version and upload it to Firebase.
241
254
2. From the root directory of the repository, build the site:
242
255
243
256
```terminal
244
- dart run dart_site build
257
+ ./dash_site build
245
258
```
246
259
247
260
This will build the site and copy it to your local ` _site ` directory.
0 commit comments