Add rollup-plugin-screeps-upload to upload directly to screeps
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,6 +13,9 @@
|
||||
# TypeScript definitions installed by Typings
|
||||
/typings
|
||||
|
||||
# Screeps Config
|
||||
screeps.json
|
||||
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
*.err
|
||||
|
||||
@@ -15,6 +15,14 @@ Open the folder in your terminal and run `npm install` (or `yarn`) to install th
|
||||
|
||||
Fire up your preferred editor with typescript installed and you are good to go!
|
||||
|
||||
### Rollup
|
||||
|
||||
Screeps Typescript Starter uses rollup to compile your typescript and upload it to a screeps server.
|
||||
|
||||
Change `creeps.sample.json` to `screeps.json` and update the settings.
|
||||
|
||||
Running `rollup -c` will compile and upload your code.
|
||||
|
||||
## Typings
|
||||
|
||||
The typings for Screeps comes from [typed-screeps](https://github.com/screepers/typed-screeps), if you have an issue with incorrect typings open an issue there.
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"rollup": "^0.51.8",
|
||||
"rollup-plugin-commonjs": "^8.2.6",
|
||||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
"rollup-plugin-screeps-upload": "git+https://github.com/ezolenko/rollup-plugin-screeps-upload.git#master",
|
||||
"rollup-plugin-typescript2": "^0.8.1",
|
||||
"tslint": "^5.8.0",
|
||||
"typed-screeps": "^1.0.4",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import resolve from "rollup-plugin-node-resolve";
|
||||
import commonjs from "rollup-plugin-commonjs";
|
||||
import screepsUpload from "rollup-plugin-screeps-upload";
|
||||
import typescript from "rollup-plugin-typescript2";
|
||||
|
||||
// In Screeps, require only works for exported content
|
||||
@@ -34,6 +35,7 @@ export default {
|
||||
resolve(),
|
||||
commonjs(),
|
||||
typescript({tsconfig: "./tsconfig.json"}),
|
||||
screepsUpload('./screeps.json'),
|
||||
exportSourceMaps()
|
||||
]
|
||||
}
|
||||
|
||||
8
screeps.sample.json
Normal file
8
screeps.sample.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"email": "you@provider.tld",
|
||||
"password": "Password",
|
||||
"protocol": "https",
|
||||
"hostname": "screeps.com",
|
||||
"port": 443,
|
||||
"path": "/"
|
||||
}
|
||||
Reference in New Issue
Block a user