Resume work on first draft of docs
This commit is contained in:
@@ -7,11 +7,17 @@
|
|||||||
### Getting Started
|
### Getting Started
|
||||||
|
|
||||||
* [Installation](./getting-started/installation.md)
|
* [Installation](./getting-started/installation.md)
|
||||||
* [Usage](./getting-started/usage.md)
|
* [Deploying](./getting-started/deploying.md)
|
||||||
|
|
||||||
|
### In-Depth
|
||||||
|
|
||||||
|
* Configuration variables
|
||||||
|
* TypeScript
|
||||||
|
* Strict mode
|
||||||
|
* TSLint
|
||||||
|
* Cookbook
|
||||||
|
* [TODO]
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Stuff You Might Want to Know
|
|
||||||
|
|
||||||
* Cookbook
|
|
||||||
* FAQ & Troubleshooting
|
* FAQ & Troubleshooting
|
||||||
|
|||||||
64
docs/getting-started/deploying.md
Normal file
64
docs/getting-started/deploying.md
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# Deploying
|
||||||
|
|
||||||
|
## Building Configuration Files
|
||||||
|
|
||||||
|
The starter kit builds your code using `rollup`, which uses a `screeps.json` file as its configuration file. A sample config file is provided within the project, to use it, simply make a copy and rename it to `screeps.json`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp screeps.sample.json screeps.json
|
||||||
|
```
|
||||||
|
|
||||||
|
> **IMPORTANT:** The `screeps.json` file contains your Screeps credentials. If you use any source control, **DO NOT** check in this file into your repository.
|
||||||
|
|
||||||
|
[TODO: move to 'in-depth']
|
||||||
|
|
||||||
|
The `screeps.json` file is a JSON configuration file that can be separated into multiple environments. We've given you three primary environments by default.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
// Used for deploying to the main world
|
||||||
|
"main": {
|
||||||
|
"email": "you@provider.tld",
|
||||||
|
"password": "Password",
|
||||||
|
"protocol": "https",
|
||||||
|
"hostname": "screeps.com",
|
||||||
|
"port": 443,
|
||||||
|
"path": "/",
|
||||||
|
"branch": "main"
|
||||||
|
},
|
||||||
|
// Used for deploying to Simulation mode
|
||||||
|
"sim": {
|
||||||
|
"email": "you@provider.tld",
|
||||||
|
"password": "Password",
|
||||||
|
"protocol": "https",
|
||||||
|
"hostname": "screeps.com",
|
||||||
|
"port": 443,
|
||||||
|
"path": "/",
|
||||||
|
"branch": "sim"
|
||||||
|
},
|
||||||
|
// Used for deploying to a private server
|
||||||
|
"pserver": {
|
||||||
|
"email": "username",
|
||||||
|
"password": "Password",
|
||||||
|
"protocol": "http",
|
||||||
|
"hostname": "1.2.3.4",
|
||||||
|
"port": 21025,
|
||||||
|
"path": "/",
|
||||||
|
"branch": "main"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
We're going to focus on the `main` environment as a starter. Fill in your Screeps credentials accordingly, along with your target branch.
|
||||||
|
|
||||||
|
> **Note:** You don't have to manually create the branch in your Screeps client if it doesn't exist yet. `rollup` will do it for you.
|
||||||
|
|
||||||
|
Once you're done, run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run push-main
|
||||||
|
```
|
||||||
|
|
||||||
|
Now go to your Screeps client and make sure your code is deployed properly.
|
||||||
|
|
||||||
|

|
||||||
BIN
docs/getting-started/img/deploying-1.png
Normal file
BIN
docs/getting-started/img/deploying-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -6,8 +6,9 @@ You will need:
|
|||||||
|
|
||||||
- Node.JS (Latest LTS is recommended)
|
- Node.JS (Latest LTS is recommended)
|
||||||
- A Package Manager (Yarn or NPM)
|
- A Package Manager (Yarn or NPM)
|
||||||
|
- Rollup (install with `npm intall -g rollup`)
|
||||||
|
|
||||||
## Install `npm` Modules
|
## Installing `npm` Modules
|
||||||
|
|
||||||
Run the following the command to install the required packages and TypeScript declaration files:
|
Run the following the command to install the required packages and TypeScript declaration files:
|
||||||
|
|
||||||
@@ -20,3 +21,5 @@ Or if you're running `yarn`:
|
|||||||
```bash
|
```bash
|
||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Next up, we'll configure our environment and run our first code deploy.
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
# Usage
|
|
||||||
|
|
||||||
*This page is a stub. [Help expand it?](https://github.com/screepers/screeps-typescript-starter/blob/v3.0/docs/getting-started/usage.md)*
|
|
||||||
Reference in New Issue
Block a user