Publish project files using Git.
The goal of this plugin is to simplify the use of Git as a transport channel for publishing files from your project to the web. An example use case would be publishing documentation sources that live in the same repository as your project's code to the web using GitHub Pages.
transbrute creates a throwaway Git repository, adds those parts of your project that you specified, and pushes them to the remote repository you specified.
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-transbrute --save-dev
In your project's Gruntfile, add a section named
transbrute to the
data object passed into
The URI for the remote repository. Required.
The name of the remote branch. Required.
'Add <TARGET_NAME> from <TIMESTAMP>'
The commit message to use. An occurrence of
%DATE in the string will
be replaced by the current timestamp in ISO format.
If a tag identifier is given, the commit will be tagged before being
pushed. Can be combined with
If in addition to a tag identifier a tag message is given, the tag will
be annotated with this message.If
tag is not provided,
will be ignored.
true, contents of the remote repository will be pulled before files
are processed and committed.
true, the commit will be force-pushed.
A list of files to use. You can specify files that are actually present
in the filesystem in the usual Grunt way, but you should set the
option to the directory from which the files have relative paths that
equal those you want them to have in the repository.
Additionally, you can add files inline by giving their relative path
within the repository as
dest and specifying their body as
body can either be a string, which will be written to the file, or a
JSON-serializable object, which will first be pretty-printed using
JSON.stringify and then written to the file.
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.