-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(repo): create local registry scripts
- Loading branch information
1 parent
3944d55
commit 4f29fb4
Showing
4 changed files
with
703 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
ENABLE=$1 | ||
|
||
if [[ $ENABLE == "enable" ]]; then | ||
echo "Setting registry to local registry" | ||
echo "To Disable: yarn local-registry disable" | ||
npm config set registry http://localhost:4873/ | ||
yarn config set registry http://localhost:4873/ | ||
fi | ||
|
||
if [[ $ENABLE == "disable" ]]; then | ||
npm config delete registry | ||
yarn config delete registry | ||
CURRENT_NPM_REGISTRY=`npm config get registry` | ||
CURRENT_YARN_REGISTRY=`yarn config get registry` | ||
|
||
echo "Reverting registries" | ||
echo " > NPM: $CURRENT_NPM_REGISTRY" | ||
echo " > YARN: $CURRENT_YARN_REIGSTRY" | ||
fi | ||
|
||
if [[ $ENABLE == "start" ]]; then | ||
echo "Starting Local Registry" | ||
npx verdaccio | ||
fi |
Oops, something went wrong.