Grunt plugin to take a build from dist on your current branch and put it into another branch, e.g. gh-pages, without merging. Ideal for when builds should be stored in orphan branches.
npm install && grunt build, then look at the
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-build-gh-pages --save-dev
--orphanbranch that has just the builds exists
In your project's Gruntfile, add a section named
buildGhPages to the data object passed into
dist: The directory the build is placed in. This directory should be gitignored in your current branch and the build branch.
build_branch: The name of the branch the build should be commited to. This branch should exist. Ideally it should be an orphan branch.
pull: Whether you want to the a
git pull --rebaseon the build branch before modifying it. Use this if mutliple people can build to the repo.
exclude: An array of other directories besides
node_modulesyou wish to exclude. These directories should be in the
.gitignoreof both branches.
copy_hidden: If this value is truthy. Hidden files will be copied from the root dist directory to the final build directory. Hidden files in subfolders of dist are automatically copied.
In this example, the default options are used to do something with whatever. So if the
testing file has the content
Testing and the
123 file had the content
1 2 3, the generated result would be
Testing, 1 2 3.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
undefined Created: 2015-08-22 07:52:41_