2.0.1 • Published 6 years ago
screeps-push v2.0.1
Sample usage
let push = require('screeps-push')
let creds = require('./creds')
let branch = process.argv[2] || 'test'
let isPrivate = process.argv[3]
push(Object.assign({
private: isPrivate? true: false,
dir: './src',
branch: branch
}, creds))
.then(res=> console.log('\x1b[32m', 'SCREEPS push went OK to', branch, '\x1b[0m'))
.catch(err=> console.log('\x1b[31m', err, 'SCREEPS push NOT OK to', branch, 0'\x1b[0m'))
Configuration
Uses screeps-interface for server/connection configuration, along with custom push opts:
{
"dir": "./src",
"branch": "default by default. You can override by filling it"
}
Notes
Will upload files inside folders (only .js files). For example:
- obj
- creep.js
- pos.js
- stats.js
Files will be uploaded/accessible by obj/creep
, obj/pos
, stats
. All files will always have to require from base path regardless of folder location (creep.js
would do require('stats')
, no ./
or ../
)