GitBook: [master] 17 pages and 5 assets modified

This commit is contained in:
resir014
2018-08-06 07:35:02 +00:00
committed by gitbook-bot
parent e30369ac50
commit 1b205e3330
19 changed files with 86 additions and 75 deletions

View File

@@ -12,7 +12,7 @@ If you have an existing copy of your starter kit, follow these steps:
## Seting up Screeps authentication
The authentication token is pulled by the starter kit from a file named `screeps.json`. A sample config file (`screeps.sample.json`) is provided within the project, to use it, simply make a copy and rename it to `screeps.json`.
The authentication token is pulled by the starter kit from a file named `screeps.json`. A sample config file \(`screeps.sample.json`\) 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
@@ -22,23 +22,23 @@ cp screeps.sample.json screeps.json
## Generating an auth token
To generate an authentication token, click **[your username] > Manage account**. You should see the **Auth tokens** in the options now, click it.
To generate an authentication token, click **\[your username\] > Manage account**. You should see the **Auth tokens** in the options now, click it.
![authenticating-1](img/authenticating-1.png)
![authenticating-1](../.gitbook/assets/authenticating-1.png)
On the next screen, we'll create a full access token. We pick the **Full access** option, then click the **Generate Token** button.
![authenticating-2](img/authenticating-2.png)
![authenticating-2](../.gitbook/assets/authenticating-2.png)
Your generated token should now be shown on your screen. Copy it to your clipboard.
![authenticating-3](img/authenticating-3.png)
![authenticating-3](../.gitbook/assets/authenticating-3.png)
> **Note:** This token will be displayed **only once**! Make sure to never lose it. However, if you did lose it, simply remove said token from your account, and create a new one.
Now, paste it to your `screeps.json` file.
![authenticating-4](img/authenticating-4.png)
![authenticating-4](../.gitbook/assets/authenticating-4.png)
## Sanity check
@@ -52,4 +52,5 @@ Now go to your Screeps client and check if the `main` branch is created, or if s
It works? Good, you've successfully authenticated!
Next up, we'll configure our environment and [run our first code deploy](./deploying.md).
Next up, we'll configure our environment and [run our first code deploy](deploying.md).

View File

@@ -6,7 +6,7 @@ The starter kit builds your code using `rollup`, which uses a `screeps.json` fil
The `screeps.json` file is a JSON configuration file separated into multiple environments. We're going to focus on the `main` environment to get you started. If you'd like to deploy to a different branch, be sure to change the `branch` key to the branch you'd like to deploy to.
![authenticating-4](img/authenticating-4.png)
![authenticating-4](../.gitbook/assets/authenticating-4.png)
> **Note:** You don't have to manually create the target branch in your Screeps client if it doesn't exist yet. `rollup-plugin-screeps` will do it for you.
@@ -20,6 +20,7 @@ npm run push-main
You're done! Now go to your Screeps client and make sure your code is deployed properly.
![deploying-2](img/deploying-2.png)
![deploying-2](../.gitbook/assets/deploying-2.png)
Ready for something extra? [Read on.](../in-depth/module-bundling.md)

View File

@@ -4,9 +4,9 @@
You will need:
- [Node.JS](https://nodejs.org/en/download) (>= 8.0.0)
- A Package Manager ([Yarn](https://yarnpkg.com/en/docs/getting-started) or [npm](https://docs.npmjs.com/getting-started/installing-node))
- Rollup CLI (Optional, install via `npm install -g rollup`)
* [Node.JS](https://nodejs.org/en/download) \(>= 8.0.0\)
* A Package Manager \([Yarn](https://yarnpkg.com/en/docs/getting-started) or [npm](https://docs.npmjs.com/getting-started/installing-node)\)
* Rollup CLI \(Optional, install via `npm install -g rollup`\)
## Installing `npm` modules
@@ -20,4 +20,5 @@ npm install
yarn
```
Once that's all done, let's [authenticate with the Screeps server](./authenticating.md).
Once that's all done, let's [authenticate with the Screeps server](authenticating.md).