mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-04 15:51:23 +00:00
Use npm config to set cache and prefix values
Add cache for nodejs-lts
This commit is contained in:
parent
dd23965bdf
commit
66927aa738
@ -14,15 +14,17 @@
|
|||||||
},
|
},
|
||||||
"extract_dir": "nodejs",
|
"extract_dir": "nodejs",
|
||||||
"persist": [
|
"persist": [
|
||||||
"bin"
|
"bin",
|
||||||
|
"cache"
|
||||||
],
|
],
|
||||||
"env_add_path": [
|
"env_add_path": [
|
||||||
".",
|
".",
|
||||||
"bin"
|
"bin"
|
||||||
],
|
],
|
||||||
"post_install": "
|
"post_install": "
|
||||||
# Set npm prefix to install modules inside bin
|
npm config set cache \"$persist_dir\\cache\"
|
||||||
Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc",
|
npm config set prefix \"$persist_dir\\bin\"
|
||||||
|
",
|
||||||
"checkver": {
|
"checkver": {
|
||||||
"url": "https://nodejs.org/en/download/",
|
"url": "https://nodejs.org/en/download/",
|
||||||
"re": "LTS version: <strong>v([\\d.]+)</strong>"
|
"re": "LTS version: <strong>v([\\d.]+)</strong>"
|
||||||
|
|||||||
@ -22,8 +22,9 @@
|
|||||||
"bin"
|
"bin"
|
||||||
],
|
],
|
||||||
"post_install": "
|
"post_install": "
|
||||||
# Set npm prefix to install modules inside bin and npm cache so they persist
|
npm config set cache \"$persist_dir\\cache\"
|
||||||
Set-Content -Value \"prefix=$dir\\bin`ncache=$dir\\cache\" -Path $dir\\node_modules\\npm\\npmrc",
|
npm config set prefix \"$persist_dir\\bin\"
|
||||||
|
",
|
||||||
"checkver": {
|
"checkver": {
|
||||||
"url": "https://nodejs.org/en/download/current/",
|
"url": "https://nodejs.org/en/download/current/",
|
||||||
"re": "Current version: <strong>v([\\d.]+)</strong>"
|
"re": "Current version: <strong>v([\\d.]+)</strong>"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user