Skip to content

vergecurrency/vergecurrency.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 your preferred terminal and install the following packages in the correct order.

Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

NodeJS:

brew install node

Yarn:

brew install yarn

Windows:

Git

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

NodeJS:

Download the Windows installer here:
https://nodejs.org/en/download/

Yarn:

Download the Windows installer here:
https://yarnpkg.com/lang/en/docs/install/

Linux:

Ubuntu/Debian

NodeJS:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Yarn:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn

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 version of NodeJS, use Node Version Manager:

NVM instructions

Example, nvm use v10.15.3

Or using .nvmrc

nvm use

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 NextJS build system. To build, just run the following command:

yarn run build

It will then build and export the whole project.

To run the build locally:

gulp

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

  • Stan Faas - Main developer - StanFaas
  • Edwin de Boer - Main developer - EdwinB89
  • Max1us - Developer / Maintainer - Max1us
  • Waveon3 - Webdesigns - Waveon3

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