https://github.com/leisn/tools
https://github.com/leisn/tools
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/leisn/tools
- Owner: leisn
- License: mit
- Created: 2021-09-18T19:23:48.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-18T19:24:31.000Z (over 3 years ago)
- Last Synced: 2025-01-29T23:14:35.313Z (4 months ago)
- Language: PowerShell
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## tools
### PackageManager-Cache-Redirect.ps1
A powershell script to config package manager's global cache directory.
**Now available:**
> Notice: when execute this script at a _yarn v2_ project folder, can not set _yarn v1_ cache folder.* npm
* yarn v1
* yarn v2
* nuget__Usage__
```bash
$ PackageManager-Cache-Redirect.ps1 [[-CacheRoot] ] [-Name ]e.g.
# set all available, default root folder is '{userdir}\.cache'.
$ PackageManager-Cache-Redirect.ps1
# set all available, with specified cache folder.
$ PackageManager-Cache-Redirect.ps1 "D:\caches"
# select whichs to config, with specified cache folder.
$ PackageManager-Cache-Redirect.ps1 "D:\caches" -Name npm,yarn.v2,nuget
```