mirror of
https://github.com/lovell/sharp.git
synced 2025-12-18 23:05:04 +01:00
Docs: improve cross-platform help messaging
tldr; don't use npm for multi-platform installs
This commit is contained in:
@@ -49,11 +49,11 @@ if (sharp) {
|
||||
help.push(
|
||||
'- Ensure optional dependencies can be installed:',
|
||||
' npm install --include=optional sharp',
|
||||
' or',
|
||||
' yarn add sharp --ignore-engines',
|
||||
'- Ensure your package manager supports multi-platform installation:',
|
||||
' See https://sharp.pixelplumbing.com/install#cross-platform',
|
||||
'- Add platform-specific dependencies:',
|
||||
` npm install --os=${os} --cpu=${cpu} sharp`,
|
||||
' or',
|
||||
` npm install --force @img/sharp-${runtimePlatform}`
|
||||
);
|
||||
} else {
|
||||
@@ -61,7 +61,6 @@ if (sharp) {
|
||||
`- Manually install libvips >= ${minimumLibvipsVersion}`,
|
||||
'- Add experimental WebAssembly-based dependencies:',
|
||||
' npm install --cpu=wasm32 sharp',
|
||||
' or',
|
||||
' npm install --force @img/sharp-wasm32'
|
||||
);
|
||||
}
|
||||
@@ -103,7 +102,7 @@ if (sharp) {
|
||||
}
|
||||
help.push(
|
||||
'- Consult the installation documentation:',
|
||||
' https://sharp.pixelplumbing.com/install'
|
||||
' See https://sharp.pixelplumbing.com/install'
|
||||
);
|
||||
throw new Error(help.join('\n'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user