Skip to content

Commit 4179ff4

Browse files
docs: add bash lang to CONTRIBUTING.md code blocks (#2159)
Added ` ```bash` markings to CONTRIBUTING.md so the code blocks are easier to notice when trying to follow the setup guide --------- Co-authored-by: Charles Wang <3612422+wan9chi@users.noreply.github.com> Co-authored-by: wan9chi <dk4rest@gmail.com>
1 parent 103b30f commit 4179ff4

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66

77
You'll need the following tools installed on your system:
88

9-
```
9+
```bash
1010
brew install pnpm node just cmake
1111
```
1212

1313
Install Rust & Cargo using rustup:
1414

15-
```
15+
```bash
1616
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
1717
cargo install cargo-binstall
1818
```
1919

2020
Initial setup to install dependencies for Vite+:
2121

22-
```
22+
```bash
2323
just init
2424
```
2525

@@ -49,13 +49,13 @@ just init
4949

5050
To create a release build of Vite+ and all upstream dependencies, run:
5151

52-
```
52+
```bash
5353
just build
5454
```
5555

5656
## Install the Vite+ Global CLI from source code
5757

58-
```
58+
```bash
5959
pnpm bootstrap-cli
6060
vp --version
6161
```
@@ -134,7 +134,7 @@ vp --version
134134

135135
You can run this command to build, test and check if there are any snapshot changes:
136136

137-
```
137+
```bash
138138
pnpm bootstrap-cli && pnpm test && git status
139139
```
140140

@@ -189,7 +189,7 @@ git push --force-with-lease
189189
190190
To sync the latest upstream dependencies such as Rolldown and Vite, run:
191191

192-
```
192+
```bash
193193
pnpm tool sync-remote
194194
just build
195195
```

docs/config/run.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
You can configure Vite Task under the `run` field in `vite.config.ts`. Check out [`vp run`](/guide/run) to learn more about running scripts and tasks with Vite+.
44

5+
<!-- prettier-ignore -->
56
```ts [vite.config.ts]
67
import { defineConfig } from 'vite-plus';
78

packages/tools/src/local-npm-registry.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ const upstreamAgent = new HttpsAgent({ keepAlive: true, maxSockets: 64 });
226226
// in a pnpm-packed tarball, so long-name (pax header) handling is unnecessary.
227227
function readPackageJsonFromTarball(tgzBytes: Buffer, sourcePath: string): PackageManifest {
228228
const tar = gunzipSync(tgzBytes);
229-
for (let offset = 0; offset + 512 <= tar.length;) {
229+
let offset = 0;
230+
while (offset + 512 <= tar.length) {
230231
const rawName = tar.subarray(offset, offset + 100).toString();
231232
const nulIndex = rawName.indexOf('\0');
232233
const name = nulIndex === -1 ? rawName : rawName.slice(0, nulIndex);

rfcs/pack-command.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ This RFC documents an existing command with no breaking changes:
412412
413413
The `exe` option accepts an object for advanced configuration:
414414
415+
<!-- prettier-ignore -->
415416
```ts
416417
export default {
417418
pack: {

0 commit comments

Comments
 (0)