Skip to content

Commit 0882b7d

Browse files
committed
docs: add run settings to settings page
ref #671
1 parent 764ba84 commit 0882b7d

File tree

5 files changed

+63
-39
lines changed

5 files changed

+63
-39
lines changed

docs/cli/run.md

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -154,45 +154,14 @@ Hide workspace prefix from output from child processes that are run in parallel,
154154

155155
## pnpm-workspace.yaml settings
156156

157-
### enablePrePostScripts
157+
import EnablePrePostScripts from '../settings/_enablePrePostScripts.mdx'
158158

159-
* Default: **true**
160-
* Type: **Boolean**
159+
<EnablePrePostScripts />
161160

162-
When `true`, pnpm will run any pre/post scripts automatically. So running `pnpm foo`
163-
will be like running `pnpm prefoo && pnpm foo && pnpm postfoo`.
161+
import ScriptShell from '../settings/_scriptShell.mdx'
164162

165-
### scriptShell
163+
<ScriptShell />
166164

167-
* Default: **null**
168-
* Type: **path**
165+
import ShellEmulator from '../settings/_shellEmulator.mdx'
169166

170-
The shell to use for scripts run with the `pnpm run` command.
171-
172-
For instance, to force usage of Git Bash on Windows:
173-
174-
```
175-
pnpm config set scriptShell "C:\\Program Files\\git\\bin\\bash.exe"
176-
```
177-
178-
### shellEmulator
179-
180-
* Default: **false**
181-
* Type: **Boolean**
182-
183-
When `true`, pnpm will use a JavaScript implementation of a [bash-like shell] to
184-
execute scripts.
185-
186-
This option simplifies cross-platform scripting. For instance, by default, the
187-
next script will fail on non-POSIX-compliant systems:
188-
189-
```json
190-
"scripts": {
191-
"test": "NODE_ENV=test node test.js"
192-
}
193-
```
194-
195-
But if the `shellEmulator` setting is set to `true`, it will work on all
196-
platforms.
197-
198-
[bash-like shell]: https://www.npmjs.com/package/@yarnpkg/shell
167+
<ShellEmulator />

docs/settings.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ patchedDependencies:
14531453

14541454
In most cases, defining an exact version is enough to override a broader range.
14551455

1456-
## allowUnusedPatches
1456+
### allowUnusedPatches
14571457

14581458
Added in: v10.7.0 (Previously named `allowNonAppliedPatches`)
14591459

@@ -1468,7 +1468,7 @@ patchedDependencies:
14681468
allowUnusedPatches: true
14691469
```
14701470

1471-
## ignorePatchFailures
1471+
### ignorePatchFailures
14721472

14731473
Added in: v10.7.0
14741474

@@ -1693,3 +1693,15 @@ Scripts listed in this array will be required in each project of the workspace.
16931693
requiredScripts:
16941694
- build
16951695
```
1696+
1697+
import EnablePrePostScripts from './settings/_enablePrePostScripts.mdx'
1698+
1699+
<EnablePrePostScripts />
1700+
1701+
import ScriptShell from './settings/_scriptShell.mdx'
1702+
1703+
<ScriptShell />
1704+
1705+
import ShellEmulator from './settings/_shellEmulator.mdx'
1706+
1707+
<ShellEmulator />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### enablePrePostScripts
2+
3+
* Default: **true**
4+
* Type: **Boolean**
5+
6+
When `true`, pnpm will run any pre/post scripts automatically. So running `pnpm foo`
7+
will be like running `pnpm prefoo && pnpm foo && pnpm postfoo`.
8+

docs/settings/_scriptShell.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### scriptShell
2+
3+
* Default: **null**
4+
* Type: **path**
5+
6+
The shell to use for scripts run with the `pnpm run` command.
7+
8+
For instance, to force usage of Git Bash on Windows:
9+
10+
```
11+
pnpm config set scriptShell "C:\\Program Files\\git\\bin\\bash.exe"
12+
```
13+

docs/settings/_shellEmulator.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### shellEmulator
2+
3+
* Default: **false**
4+
* Type: **Boolean**
5+
6+
When `true`, pnpm will use a JavaScript implementation of a [bash-like shell] to
7+
execute scripts.
8+
9+
This option simplifies cross-platform scripting. For instance, by default, the
10+
next script will fail on non-POSIX-compliant systems:
11+
12+
```json
13+
"scripts": {
14+
"test": "NODE_ENV=test node test.js"
15+
}
16+
```
17+
18+
But if the `shellEmulator` setting is set to `true`, it will work on all
19+
platforms.
20+
21+
[bash-like shell]: https://www.npmjs.com/package/@yarnpkg/shell
22+

0 commit comments

Comments
 (0)