rowoot/gulp-gh-pages — pull request #8 by MoOx (2014-04-16 06:23:30+00:00)
Title: Refactor options (adding branch name, cache & push)

Note: THIS PR IS FOR REVIEW (for now) UNTIL THIS ONE GETS MERGED https://github.com/notatestuser/gift/pull/24

This PR add the following options
- branch: The {String} branch where deploy will by done (default to
`"gh-pages"`),
- cacheDir: {String} where the git repo will be located. (default to a
temporary folder)
- push: {Boolean} to know whether or not the branch should be pushed
(default to `true`)

According to those options (mainly for the cacheDir), I add a repo.sync
call to avoid outdated cache (eg: if multiples users use the same
publish task).

I also add push option mainly for development purpose (on my project,
not on this one - we are switching from grunt to gulp & don’t want to
make some test directly on a pushed gh-pages branch)

Note: new API should be backward compatible