You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/installation.md
+69-28Lines changed: 69 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,23 @@ prek provides multiple installation methods to suit different needs and environm
6
6
7
7
The standalone installer automatically downloads and installs the correct binary for your platform:
8
8
9
-
### Linux and macOS
9
+
=== "macOS and Linux"
10
10
11
-
--8<-- "README.md:linux-standalone-install"
11
+
Use `curl` to download the script and execute it with `sh`:
12
12
13
-
### Windows
13
+
--8<-- "README.md:linux-standalone-install"
14
14
15
-
--8<-- "README.md:windows-standalone-install"
15
+
=== "Windows"
16
+
17
+
Use `irm` to download the script and execute it with `iex`:
18
+
19
+
--8<-- "README.md:windows-standalone-install"
20
+
21
+
Changing the [execution policy](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies) allows running a script from the internet.
22
+
23
+
!!! tip
24
+
25
+
The installation script may be inspected before use. Alternatively, binaries can be downloaded directly from [GitHub Releases](#github-releases).
16
26
17
27
## Package Managers
18
28
@@ -28,9 +38,27 @@ The standalone installer automatically downloads and installs the correct binary
28
38
29
39
--8<-- "README.md:mise-install"
30
40
31
-
### npmjs
41
+
### npm
42
+
43
+
prek is published as a [Node.js package](https://www.npmjs.com/package/@j178/prek)
44
+
and can be installed with any npm-compatible package manager:
45
+
46
+
```bash
47
+
# npm
48
+
npm install -g @j178/prek
49
+
50
+
# pnpm
51
+
pnpm add -g @j178/prek
52
+
53
+
# bun
54
+
bun install -g @j178/prek
55
+
```
56
+
57
+
Or as a project dependency:
32
58
33
-
--8<-- "README.md:npmjs-install"
59
+
```bash
60
+
npm add -D @j178/prek
61
+
```
34
62
35
63
### Nix
36
64
@@ -44,22 +72,29 @@ The standalone installer automatically downloads and installs the correct binary
0 commit comments