-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from woocommerce/add-nvm-and-autobranching
Add `nvm use` and auto-branching
- Loading branch information
Showing
14 changed files
with
1,221 additions
and
375 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,3 @@ vendor/ | |
|
||
# All zip files | ||
*.zip | ||
|
||
# IDE files | ||
.vscode/* |
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,16 @@ | ||
#!/bin/bash | ||
|
||
source ~/.nvm/nvm.sh | ||
nvm use || nvm install $(cat .nvmrc) | ||
|
||
case $1 in | ||
pnpm) | ||
pnpm install && pnpm run build | ||
;; | ||
npm) | ||
npm install && npm run build | ||
;; | ||
*) | ||
eval $1 | ||
;; | ||
esac |
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,20 @@ | ||
#! /bin/bash | ||
|
||
do_check=false | ||
do_use=false | ||
while getopts eu opt; do | ||
case $opt in | ||
e) do_check=true;; | ||
u) do_use=true;; | ||
esac | ||
done | ||
|
||
source ~/.nvm/nvm.sh | ||
|
||
if $do_check; then | ||
command -v nvm | ||
fi | ||
|
||
if $do_use; then | ||
nvm use || nvm install $(cat .nvmrc) | ||
fi |
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
Oops, something went wrong.