Updated Adding support for a new Mod (markdown)

This commit is contained in:
Andrew Miner
2015-06-29 09:44:30 -07:00
parent 4786fbe399
commit b329f9737a
+10 -6
View File
@@ -2,27 +2,31 @@ Crafting Guide represents all its data in the form of simple configuration files
## 1. Fork the repo ## 1. Fork the repo
Create a fork of this repo in which to make your changes. If you're not sure how to do this, check out GitHub's [help page](https://help.github.com/articles/fork-a-repo/) to get started. This will guide you through the process starting from the GitHub website all the way through having the code on your own computer. Create a fork of this repo in which to make your changes. If you're not sure how to do this, check out GitHub's [help page](https://help.github.com/articles/fork-a-repo/) to get started. This will guide you through the process starting from the GitHub website all the way through having the code on your own computer. You'll need both the [crafting-guide](http://github.com/andrewminer/crafting-guide) and [crafting-guide-data](http://github.com/andrewminer/crafting-guide-data) repos. They should both be cloned into the same directory.
## 2. Set up your environment ## 2. Set up your environment
Crafting Guide comes with a number of different command-line scripts for processing data and testing. You'll need to get your machine set up with a few command-line tools to run them before you can begin. Start by downloading [Node.js](http://nodejs.org/download/) for your OS and installing it. Next, open a terminal and navigate to your new local repo. Run the following commands to get the rest of the tools you need and build everything locally. Crafting Guide comes with a number of different command-line scripts for processing data and testing. You'll need to get your machine set up with a few command-line tools to run them before you can begin. Start by downloading [Node.js](http://nodejs.org/download/) for your OS and installing it. Next, open a terminal and navigate to your new local repo. Run the following commands to get the rest of the tools you need and build everything locally.
```bash ```bash
cd ../crafting-guide-data
grunt test
cd ../crafting-guide
sudo npm install -g coffee-script sudo npm install -g coffee-script
sudo npm install -g grunt-cli sudo npm install -g grunt-cli
npm install npm install
grunt clean build grunt clean build
./scripts/server ./scripts/server
cd ../crafting-guide-data
``` ```
_**NOTE:** If you're using Windows (instead of MacOS or Linux), you'll want to perform all of these commands using the [Git for Windows](https://msysgit.github.io/) shell. You will also need to install [rsync](https://www.itefix.net/content/get-cwrsync) manually._ _**NOTE:** If you're using Windows (instead of MacOS or Linux), you'll want to perform all of these commands using the [Git for Windows](https://msysgit.github.io/) shell. You will also need to install [rsync](https://www.itefix.net/content/get-cwrsync) manually. Finally, windows users should leave out the word `sudo` from all commands._
At this point, you'll have a local server running the CraftingGuide website at [http://localhost:8000] At this point, you'll have a local server running the CraftingGuide website at [http://localhost:8000]
(http://localhost:8000). As you work with your mod, you should verify your work on your local website. (http://localhost:8000). As you work with your mod, you should verify your work on your local website. Your working directory will be in the CraftingGuideData repository: all the remaining commands deal with that repository.
## 3. Create a new directory ## 3. Create a new directory
Open up your clone of the Crafting Guide repository, and create a new directory: `./static/data/<mod_slug>/` where the `mod_slug` is the slug generated from the Mod's official name (see: [About Slugs](https://github.com/andrewminer/crafting-guide/wiki/About-Slugs)). Open up your clone of the Crafting Guide Data repository, and create a new directory: `./static/data/<mod_slug>/` where the `mod_slug` is the slug generated from the Mod's official name (see: [About Slugs](https://github.com/andrewminer/crafting-guide/wiki/About-Slugs)).
## 4. Set up Minecraft ## 4. Set up Minecraft
@@ -48,7 +52,7 @@ Be sure to test frequently using the `grunt test` command.
## 7. Test Locally ## 7. Test Locally
As you're going along, you may find it helpful to view your new mod in the website. To do so, first add your new file name to the `DefaultMods` list in `./src/coffee/constants.coffee`. It's often handy to open a second terminal window and run `grunt clean-watch` to continuously rebuild the website as you're working, but keep in mind that you'll need to restart the command if you happen to add a new file. Recall that you local server should still be running at [http://localhost:8000](http://localhost:8000). As you're going along, you may find it helpful to view your new mod in the website. To do so, switch back to the CraftingGuide repository, and add your new file name to the `DefaultMods` list in `./src/coffee/constants.coffee`. It's often handy to open a second terminal window and run `grunt clean-watch` to continuously rebuild the website as you're working, but keep in mind that you'll need to restart the command if you happen to add a new file. Recall that you local server should still be running at [http://localhost:8000](http://localhost:8000).
Test by crafting the various items in your mod, and walking through the steps to ensure everything makes Test by crafting the various items in your mod, and walking through the steps to ensure everything makes
sense. In particular, you should look for: sense. In particular, you should look for:
@@ -72,7 +76,7 @@ sense. In particular, you should look for:
## 8. Submit a pull request ## 8. Submit a pull request
Finally, you're almost done! Push your changes up to your fork of the repository, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request/) which includes your work. Someone will review your work, and will probably point out a few things to correct. Make those changes locally, and push them up to your fork just as you did with the original set of changes. Once everything look good, you're changes will be integrated into the main repo. Finally, you're almost done! Push your changes up to your fork of the `crafting-guide-data` repository, and [submit a pull request](https://help.github.com/articles/creating-a-pull-request/) which includes your work. Someone will review your work, and will probably point out a few things to correct. Make those changes locally, and push them up to your fork just as you did with the original set of changes. Once everything look good, you're changes will be integrated into the main repo.
## 9. Review in staging ## 9. Review in staging