From 362a84d038d71bc509f3b74b33d037600f2547e6 Mon Sep 17 00:00:00 2001
From: Pig Fang
Date: Sun, 23 Sep 2018 23:54:54 +0800
Subject: [PATCH] Update markdown files [skip ci]
---
.github/CONTRIBUTING.md | 103 ++++++++++++++++++
.../ISSUE_TEMPLATE.md | 0
README.md | 29 ++---
README_EN.md | 27 +++--
4 files changed, 134 insertions(+), 25 deletions(-)
create mode 100644 .github/CONTRIBUTING.md
rename ISSUE_TEMPLATE.md => .github/ISSUE_TEMPLATE.md (100%)
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 00000000..75d65cee
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,103 @@
+# Contributing Guideline
+
+Welcome to contributing to Blessing Skin!
+
+## Development
+
+### Environment Setup
+
+Please make sure you have installed the tools below:
+
+- [Git](https://git-scm.org)
+- [Node.js](https://nodejs.org)
+- [Yarn](https://yarnpkg.com)
+- [Composer](https://getcomposer.org)
+
+And run the commands to pull the code:
+
+```bash
+git clone https://github.com/printempw/blessing-skin-server.git
+cd blessing-skin-server
+composer install
+yarn
+```
+
+Then run `cp .env.example .env`. Don't forget to configure the `.env` file.
+
+### Developing
+
+Front-end code need to be built before running Blessing Skin.
+
+If the `APP_ENV` is `development` in `.env` file, you need to run `yarn dev` and keep that process running. That will let front-end resource be loaded correctly, and the page will gain the ability of hot reload.
+
+If the `APP_ENV` equals to other value, you need to run `yarn build` first. This operation will build and compress the front-end resource. Generally, this should be used for production.
+
+### Testing
+
+Test front-end code:
+
+```bash
+yarn test
+```
+
+Test PHP code:
+
+```bash
+./vendor/bin/phpunit
+```
+
+## Code Convention
+
+Please make sure you have installed EditorConfig extension/plugin in your editor or IDE. It's recommended to install the plugin for ESLint if you are developing front-end. (You can also run `yarn lint` to check the code.)
+
+# 贡献指南
+
+欢迎您为 Blessing Skin 作出贡献!
+
+## 开发
+
+### 环境设置
+
+首先确保您安装好以下工具:
+
+- [Git](https://git-scm.org)
+- [Node.js](https://nodejs.org)
+- [Yarn](https://yarnpkg.com)
+- [Composer](https://getcomposer.org)
+
+然后执行以下命令来拉取代码:
+
+```bash
+git clone https://github.com/printempw/blessing-skin-server.git
+cd blessing-skin-server
+composer install
+yarn
+```
+
+然后执行 `cp .env.example .env`,并在 `.env` 中配置好您的环境信息。
+
+### 进行开发
+
+运行 Blessing Skin 前,前端代码需要并构建。
+
+当 `.env` 中的 `APP_ENV` 为 `development` 时,您需要先执行 `yarn dev` 并保持此进程的运行。这样 Blessing Skin 的前端资源才能被正确加载,同时使页面带有热重载功能。
+
+当 `APP_ENV` 为其它值时,您需要事先执行 `yarn build`。此命令将构建并压缩前端资源。通常用于生产环境。
+
+### 测试
+
+进行前端测试:
+
+```bash
+yarn test
+```
+
+进行 PHP 代码测试:
+
+```bash
+./vendor/bin/phpunit
+```
+
+## 代码规范
+
+请确保您的编辑器或 IDE 安装好 EditorConfig 插件。如果进行前端开发,推荐安装上 ESLint 插件。(您也可以通过执行 `yarn lint` 进行检查)
diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
similarity index 100%
rename from ISSUE_TEMPLATE.md
rename to .github/ISSUE_TEMPLATE.md
diff --git a/README.md b/README.md
index 6a384bdf..6fa1aa3b 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,8 @@
+**注意:当前分支上的代码是 Blessing Skin v4 的**
+
优雅的开源 Minecraft 皮肤站,现在,回应您的等待。
Blessing Skin 是一款能让您上传、管理和分享您的 Minecraft 皮肤和披风的 Web 应用程序。与修改游戏材质包不同的是,所有人都能在游戏中看到各自的皮肤和披风(当然,前提是玩家们要使用同一个皮肤站)。
@@ -68,29 +70,30 @@ Blessing Skin 提供了强大的插件系统,您可以通过添加多种多样
自行构建
------------
-如果你想为此项目作贡献,或者抢先尝试未发布的新功能,你应该先用 Git 上的代码部署。
+如果你想为此项目作贡献,或者抢先尝试未发布的新功能,你应该先用 GitHub 上的代码部署。
**不推荐不熟悉 shell 操作以及不想折腾的用户使用。**
-从 Git 上 clone 源码并安装依赖:
+请先确保您安装好以下工具:
+
+- [Git](https://git-scm.org)
+- [Node.js](https://nodejs.org)
+- [Yarn](https://yarnpkg.com)
+- [Composer](https://getcomposer.org)
+
+从 GitHub 上 clone 源码并安装依赖:
```bash
-$ git clone https://github.com/printempw/blessing-skin-server.git
-$ composer install
-$ yarn install
-```
-
-运行自动化测试(可跳过):
-
-```bash
-$ yarn test
-$ ./vendor/bin/phpunit
+git clone https://github.com/printempw/blessing-skin-server.git
+cd blessing-skin-server
+composer install
+yarn
```
构建前端代码!
```bash
-$ yarn run build
+yarn build
```
接下来请参考「快速安装向导」进行后续安装。
diff --git a/README_EN.md b/README_EN.md
index d6012728..5a9a4e6f 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -12,6 +12,8 @@
+**NOTE: The code of the current branch is of Blessing Skin v4.**
+
Are you puzzled by losing your custom skins in Minecraft servers runing in offline mode? Now you can easily get them back with the help of Blessing Skin!
Blessing Skin is a web application where you can upload, manage and share your custom skins & capes! Unlike modifying a resource pack, everyone in the game will see the different skins of each other (of course they should register at the same website too).
@@ -69,29 +71,30 @@ For more information, please refer to [Wiki - Introducing plugin system](https:/
Developer Install
------------
-If you'd like make some contribution on the project, please deploy it from git first.
+If you'd like make some contribution on the project, please deploy it from GitHub first.
**You'd better have some experience on shell operations to continue.**
+Please make sure you have installed the tools below:
+
+- [Git](https://git-scm.org)
+- [Node.js](https://nodejs.org)
+- [Yarn](https://yarnpkg.com)
+- [Composer](https://getcomposer.org)
+
Clone the code from GitHub and install dependencies:
```bash
-$ git clone https://github.com/printempw/blessing-skin-server.git
-$ composer install
-$ yarn install
-```
-
-Run the tests (optional):
-
-```bash
-$ yarn test
-$ ./vendor/bin/phpunit
+git clone https://github.com/printempw/blessing-skin-server.git
+cd blessing-skin-server
+composer install
+yarn
```
Build the things!
```bash
-$ yarn run build
+yarn build
```
Congrats! You made it. Next, please refer to No.2 of **Quick Install** section.