Skip to content

vergecurrency/vergecurrency.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,460 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

VergeCurrency

Deploy Next.js site to Pages

contributions welcome

Vergecurrency.com

The lightning fast Verge website built with NextJS on top of ReactJS.

Prerequisites

You need the following prerequisites to be able to both install and get the project running on your local machine.

Mac:

Open Terminal and install the repo's required Node and Yarn versions.

This repo currently targets Node v22.22.1 and uses Yarn Classic (yarn.lock).

Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Node.js and nvm:

brew install nvm
mkdir -p ~/.nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$(brew --prefix nvm)/nvm.sh" ] && \. "$(brew --prefix nvm)/nvm.sh"
nvm install 22.22.1
nvm use 22.22.1

Yarn:

corepack enable
corepack prepare yarn@1.22.22 --activate

Windows:

This repo currently targets Node v22.22.1 and uses Yarn Classic (yarn.lock).

Git

Download the Windows installer here:
https://git-scm.com/download/win

Node.js:

Install Node 22.22.1 from:
https://nodejs.org/en/download/

Yarn:

Open Git Bash or PowerShell and run:
corepack enable
corepack prepare yarn@1.22.22 --activate

Linux:

Ubuntu/Debian

This repo currently targets Node v22.22.1 and uses Yarn Classic (yarn.lock).

Node.js and nvm:

curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 22.22.1
nvm use 22.22.1

Yarn:

corepack enable
corepack prepare yarn@1.22.22 --activate

Installing

Use your favorite terminal to get up and running by following the next steps: Note: Windows users will need to launch Git Bash to install Yarn dependencies successfully.

Clone the project into a directory on your machine:

git clone https://github.com/vergecurrency/vergecurrency.com.git

Cd into the newly created directory:

cd vergecurrency.com

If you have a different Node version installed, use Node Version Manager:

NVM instructions

This repo includes .nvmrc, so the usual command is:

nvm use

Or install and switch explicitly:

nvm install 22.22.1
nvm use 22.22.1

Install dependencies:

yarn install

Run the application:

yarn run dev

Open the website in your browser:

http://localhost:3000

Running the tests

We have implemented 2 linters in this project.

ESLint with AirBNB config

ESLint a single file:

./node_modules/.bin/eslint _filename_.js

ESLint the pages

./node_modules/.bin/eslint pages/**/*.js

EsLint the whole project

./node_modules/.bin/eslint */*.js

Node SASS Lint

Lint a single file

./node_modules/.bin/sass-lint -c ./.sasslintrc './path/to/file.scss'

Lint all the SCSS files

./node_modules/.bin/sass-lint -c ./.sasslintrc '**/*.scss'

Local deployment

We're using the Next.js build system. To create the production export used for GitHub Pages, run:

yarn run build

This builds the site and exports the static output into docs/.

To run the site locally in development:

yarn run dev

Then open:

http://localhost:3000

GitHub Pages deployment is handled by the GitHub Actions workflow in .github/workflows/build-and-deploy.yml, which runs yarn install --frozen-lockfile and yarn build on pushes to master.

Translations

Folder structure

Make sure you only use the short name for languages. So for example the folder name for the English language is en, Russian will be ru and France will be fr. If you would use a folder name that has a different name it will not work. So for example en-GB wouldn't work. If you feel this is a thing that we should allow, then please contact me on Discord (StanFaas).

New translations

When adding a new language to our locales folder you should make sure to add the language code (folder name) to the languages.json file. This file can be found in: ./lists/languages.json. Be aware that the language will be active directly after you add it to that file.

Built With

  • NextJS - The SSR framework used
  • i18next - Used for translations
  • ESLint - Used for JavaScript linting
  • sass-lint - Used for SCSS linting
  • postcss-loader - Used for transforming styles with Webpack.
  • autoprefixer - Used to parse CSS and add vendor prefixes to rules by Can I use.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Releases

No releases published

Packages

 
 
 

Contributors