Lightning Fast Verge网站在Reactjs之上构建了NextJ。
您需要以下先决条件,才能在本地计算机上安装和使项目运行。
打开您首选的终端,并按照正确的顺序安装以下软件包。
自制:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
nodejs:
brew install node
纱:
brew install yarn
git
Download the Windows installer here:
https://git-scm.com/download/win
nodejs:
Download the Windows installer here:
https://nodejs.org/en/download/
纱:
Download the Windows installer here:
https://yarnpkg.com/lang/en/docs/install/
Ubuntu/Debian
nodejs:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
纱:
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
使用您喜欢的终端按照下一步的步骤来启动和运行:注意:Windows用户将需要启动Git Bash以成功安装纱线依赖项。
将项目克隆到您的计算机上的目录:
git clone https://github.com/vergecurrency/vergecurrency.com.git
CD进入新创建的目录:
cd vergecurrency.com
如果您有不同版本的nodejs,请使用Node版本管理器:
NVM说明
Example, nvm use v10.15.3
或使用.NVMRC
nvm use
安装依赖项:
yarn install
运行应用程序:
yarn run dev
在您的浏览器中打开网站:
http://localhost:3000
我们已经在这个项目中实现了2个衬里。
eslint一个文件:
./node_modules/.bin/eslint _filename_.js
eslint页面
./node_modules/.bin/eslint pages/**/*.js
ESLINT整个项目
./node_modules/.bin/eslint */*.js
遮盖一个文件
./node_modules/.bin/sass-lint -c ./.sasslintrc './path/to/file.scss'
覆盖所有SCSS文件
./node_modules/.bin/sass-lint -c ./.sasslintrc '**/*.scss'
我们正在使用NextJS构建系统。要构建,只需运行以下命令:
yarn run build
然后,它将构建和导出整个项目。
在本地运行构建:
gulp
确保您仅使用语言的简短名称。因此,例如,英语的文件夹名称是en ,俄语将为ru ,法国将是fr 。如果您使用具有不同名称的文件夹名称,则无法正常工作。因此,例如en-GB行不通。如果您认为这是我们应该允许的事情,请通过Discord(Stanfaas)与我联系。
在向我们的Locales文件夹中添加新语言时,您应该确保将语言代码(文件夹名称)添加到languages.json文件中。该文件可以在: ./lists/languages.json languages.json中找到。请注意,将语言添加到该文件后,该语言将直接处于活动状态。
请阅读有关我们的行为准则的详细信息以及向我们提交拉的请求的过程的详细信息。
另请参阅参与该项目的贡献者列表。
该项目是根据MIT许可证获得许可的 - 有关详细信息,请参见许可证文件