Thanks for contributing to the explorer!
We're thrilled you're interested and your help is greatly appreciated. Contributing is a great way to learn about the XRP Ledger (XRPL).
- server/ - Backend code lives here
- src - Frontend code lives here
- public - Translations, fonts, and other misc files live here
- .env - Environment variables
You need only to do this once and you have probably already done this if you already use git.
- Download git.
- Set your email address and name:
- git config --global user.email [email protected]
- git config --global user.name “Your Name Here”
- Create a GitHub account if you haven’t already. Let’s assume your git account name is username.
- Go to https://github.com/ripple/explorer.
- Click on the “Watch”, “Star” and “Fork” buttons in the top right.
- That last command will fork a new copy of the repo in your personal git area at https://github.com/username/explorer
$ git clone [email protected]:username/explorer.git --branch staging
$ cd explorer
$ git remote add upstream [email protected]:ripple/explorer.git
$ git fetch upstream staging
$ git checkout staging
$ git checkout -b your-branch-name
$ git push --set-upstream origin your-branch-name
Bring in recent changes to the “staging” branch into your own branch
$ git fetch upstream staging
$ git pull upstream staging
You must submit a pushed branch of your GitHub fork.
- Go to your fork of the code at https://github.com/username/explorer.
- Select the branch you want reviewed from the grey “branch” menu on the left of the page.
- Click on the green button marked “Compare & pull request” on the right of the page.
- Fill in the PR template, then press the green “Send pull request” button on the right side.
Before being considered for review or merging, each pull request must:
- Pass tests and linter locally
- running
$ npm run test
and$ npm run lint
should show no errors or create additional warnings.
- running
- Be marked as drafts until they are ready for review.
- Adhere to the code of conduct for this repository.
All new react components must be function components unless there is good reason to use classes.
We are using react18-json-view
We are using Google Analytics. For more info read the documentation
VSC is fast and reliable IDE if you choose to use it please do a following configurations
- DotENV
- ESLint
- Prettier - Code formatter
{
"explorer.confirmDelete": false,
"editor.formatOnSave": true,
"stylelint.enable": true,
"files.exclude": {
"node_modules/": true,
"coverage/": true,
"build/": true,
"src/**/*.css": true
}
}
npm install -g npm-check-updates
- to see the available updates
ncu
- to update the package.json
ncu -u
- documentation
npm install -g fixpack
- to re-write package.json run
fixpack
- documentation
npm install -g nsp
- to check for security issues run
nsp check --output summary
- documentation
vim ~/.bash_profile
- paste the following config
## Show branch name in color
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOR="\[\033[0m\]"
PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "
vim ~/.gitconfig
- paste the following config
## This is Git's per-user configuration file.
[user]
name = %YOUR_NAME%
email = %YOUR_EMAIL%
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
unstage = reset HEAD --
last = log -1 HEAD