-
Notifications
You must be signed in to change notification settings - Fork 57
Yarik/gm world frontend #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
bdaf40f
Update gm frontend tutorial
yarikbratashchuk 66b24a4
Update gm world tutorial: use bash and which
yarikbratashchuk 813e6c1
Add celestia-da tutorial, network agnostic (#368)
yarikbratashchuk 11ceb7b
Node and yarn versions as constants, custom script to install yarn an…
a0b2d7b
Add brew bin to $PATH
28a79a4
Minor updates to jq and go installation scripts
yarikbratashchuk 36be7bc
Update public/install-jq.sh
yarikbratashchuk a29bc20
Use bash-vue
yarikbratashchuk 2fabcd8
Use bash instead of sh, yes, it's opinionated
yarikbratashchuk ac1b276
Add screenshot with connected wallet
yarikbratashchuk 20f2313
Uppercase yarn and nodejs
yarikbratashchuk 2baa4ce
Exit if curl is not installed
yarikbratashchuk 4a8b183
Merge branch 'main' into yarik/gm-world-frontend
yarikbratashchuk 7bf3286
docs: add vA callout back
jcstein 9af829c
fix: image linking, err in runtime
jcstein 2425342
docs: standard sentence case capitalization
jcstein bbb5f6e
feat: remove now unused images
jcstein ffe52e0
Apply suggestions from code review
jcstein 8cefc26
Update tutorials/gm-world-frontend.md
jcstein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,9 @@ | ||
#!/bin/bash | ||
|
||
echo "Downloading GM Frontend tutorial source code..." | ||
git clone https://github.com/rollkit/gm-frontend.git | ||
cd gm-frontend || { echo "Failed to find the downloaded repository"; exit 1; } | ||
echo "Installing dependencies..." | ||
yarn install | ||
echo "Starting dev server..." | ||
yarn run dev |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,29 +1,42 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
echo "Detected macOS. Installing jq..." | ||
if ! command -v brew &> /dev/null; then | ||
echo "Homebrew is not installed. Installing Homebrew..." | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
fi | ||
brew install jq | ||
echo "jq has been installed successfully." | ||
|
||
echo "Detected macOS. Installing jq..." | ||
if ! command -v brew &> /dev/null; then | ||
echo "Homebrew is not installed. Installing Homebrew..." | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
# adding /opt/homebrew/bin to the $PATH variable based on the shell | ||
if [[ -f "$HOME/.bash_profile" ]]; then | ||
echo "export PATH=\"/opt/homebrew/bin:\$PATH\"" >> "$HOME/.bash_profile" | ||
source "$HOME/.bash_profile" | ||
elif [[ -f "$HOME/.bashrc" ]]; then | ||
echo "export PATH=\"/opt/homebrew/bin:\$PATH\"" >> "$HOME/.bashrc" | ||
source "$HOME/.bashrc" | ||
elif [[ -f "$HOME/.zshrc" ]]; then | ||
echo "export PATH=\"/opt/homebrew/bin:\$PATH\"" >> "$HOME/.zshrc" | ||
source "$HOME/.zshrc" | ||
else | ||
echo "Unsupported shell. Please add /opt/homebrew/bin to your PATH manually." | ||
exit 1 | ||
fi | ||
yarikbratashchuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
fi # Closing the brew installation check | ||
brew install jq | ||
echo "jq has been installed successfully." | ||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
echo "Detected Linux. Installing jq..." | ||
if command -v apt &> /dev/null; then | ||
sudo apt update | ||
sudo apt install -y jq | ||
elif command -v yum &> /dev/null; then | ||
sudo yum install -y epel-release | ||
sudo yum install -y jq | ||
else | ||
echo "Unsupported package manager. Please install jq manually." | ||
exit 1 | ||
fi | ||
echo "jq has been installed successfully." | ||
|
||
echo "Detected Linux. Installing jq..." | ||
if command -v apt &> /dev/null; then | ||
sudo apt update | ||
sudo apt install -y jq | ||
elif command -v yum &> /dev/null; then | ||
sudo yum install -y epel-release | ||
sudo yum install -y jq | ||
else | ||
echo "Unsupported package manager. Please install jq manually." | ||
exit 1 | ||
fi | ||
echo "jq has been installed successfully." | ||
else | ||
echo "Unsupported operating system." | ||
exit 1 | ||
fi | ||
echo "Unsupported operating system." | ||
exit 1 | ||
fi # Closing the OS type check | ||
|
This file contains hidden or 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,66 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
INSTALL_NODE_VER=21.7.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (comment 2/2) Q: how should we maintain these along with the variables? |
||
INSTALL_NVM_VER=0.39.7 | ||
INSTALL_YARN_VER=1.22.19 | ||
|
||
# You can pass node and yarn versions as arguments to this script | ||
if [ "$1" != '' ]; then | ||
echo "==> Using specified node version - $1" | ||
INSTALL_NODE_VER=$1 | ||
fi | ||
if [ "$2" != '' ]; then | ||
echo "==> Using specified yarn version - $2" | ||
INSTALL_YARN_VER=$2 | ||
fi | ||
|
||
jcstein marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "==> Ensuring .bashrc exists and is writable" | ||
touch ~/.bashrc | ||
|
||
echo "==> Installing node version manager (NVM). Version $INSTALL_NVM_VER" | ||
# Removed if already installed | ||
rm -rf ~/.nvm | ||
# Unset exported variable | ||
export NVM_DIR= | ||
|
||
# Install nvm | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$INSTALL_NVM_VER/install.sh | bash | ||
# Make nvm command available to terminal | ||
source ~/.nvm/nvm.sh | ||
yarikbratashchuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
echo "==> Installing node js version $INSTALL_NODE_VER" | ||
nvm install $INSTALL_NODE_VER | ||
yarikbratashchuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
echo "==> Make this version system default" | ||
nvm alias default $INSTALL_NODE_VER | ||
yarikbratashchuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
nvm use default | ||
|
||
echo "==> Installing Yarn package manager" | ||
rm -rf ~/.yarn | ||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $INSTALL_YARN_VER | ||
yarikbratashchuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
echo "==> Adding Yarn and Node to environment path" | ||
# Yarn configurations | ||
mv $HOME/.nvm/versions/node/v$INSTALL_NODE_VER/bin/node $HOME/.yarn/bin | ||
yarikbratashchuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export PATH="$HOME/.yarn/bin:$PATH" | ||
yarn config set prefix ~/.yarn -g | ||
|
||
echo "==> Checking for versions" | ||
nvm --version | ||
node --version | ||
npm --version | ||
yarn --version | ||
|
||
echo "==> Print binary paths" | ||
which npm | ||
which node | ||
which yarn | ||
|
||
echo "==> List installed node versions" | ||
nvm ls | ||
|
||
nvm cache clear | ||
echo "==> Now you're all setup and ready for development. If changes are yet to take effect, I suggest you restart your computer" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(comment 1/2) note to remember to update this and also the script when versions change