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",
|
||||
"persist": [
|
||||
"bin"
|
||||
"bin",
|
||||
"cache"
|
||||
],
|
||||
"env_add_path": [
|
||||
".",
|
||||
"bin"
|
||||
],
|
||||
"post_install": "
|
||||
# Set npm prefix to install modules inside bin
|
||||
Set-Content -Value \"prefix=$dir\\bin\" -Path $dir\\node_modules\\npm\\npmrc",
|
||||
npm config set cache \"$persist_dir\\cache\"
|
||||
npm config set prefix \"$persist_dir\\bin\"
|
||||
",
|
||||
"checkver": {
|
||||
"url": "https://nodejs.org/en/download/",
|
||||
"re": "LTS version: <strong>v([\\d.]+)</strong>"
|
||||
|
||||
@ -22,8 +22,9 @@
|
||||
"bin"
|
||||
],
|
||||
"post_install": "
|
||||
# Set npm prefix to install modules inside bin and npm cache so they persist
|
||||
Set-Content -Value \"prefix=$dir\\bin`ncache=$dir\\cache\" -Path $dir\\node_modules\\npm\\npmrc",
|
||||
npm config set cache \"$persist_dir\\cache\"
|
||||
npm config set prefix \"$persist_dir\\bin\"
|
||||
",
|
||||
"checkver": {
|
||||
"url": "https://nodejs.org/en/download/current/",
|
||||
"re": "Current version: <strong>v([\\d.]+)</strong>"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user