Skip to content

VincentGuinaudeau/gulp-screeps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-screeps

A Gulp plugin for commiting and retreiving code to / from your Screeps account. The plugin is based on the grunt equivalent.

Usage

gulpfile.js:

var gulp = require('gulp');
var screeps = require('gulp-screeps');
var options = { /* ... */ }
 
gulp.task('pull', function() {
	return gulp.src('*.js')
		.pipe(screeps(options));
});
gulp.task('pull', function() {
	options.action = "pull";
	return screeps(options)
		.pipe(gulp.dest('.'));
});

If you don't want to commit your account information, require an other module and export an option object. Don't forget to add the file to your .gitignore.

gulpfile.js:

var gulp = require('gulp');
var screeps = require('gulp-screeps');
var credentials = require('./credentials.js');

gulp.task('pull', function() {
	return gulp.src('*.js')
		.pipe(screeps(credentials));
});
gulp.task('pull', function() {
	credentials.action = "pull";
	return screeps(credentials)
		.pipe(gulp.dest('.'));
});
...

credentials.js:

module.exports = {
    email: 'EMAIL',
    password: 'PASSWORD',
    branch: 'default',
    ptr: false,
    host: 'someprivateserver.com',
    port: 9000,
    secure: false
};

Options

  • email - the email of your account
  • password - the password of your account
  • branch (optional) - the branch you wish to commit the code to (default : "default")
  • ptr (optional) - use Public Test Realm (default : false)
  • host (optional) - the url of the host (default : "screeps.com")
  • port (optional) - the port of the host (default : 443)
  • secure (optional) - if the host is using https instead of http (default : port == 443)
  • action (optional) - either "pull" or "push" (default : "push")

About

Gulp plugin for screeps

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%