README
bl-grunt-helper
Plugin with helper tasks for grunt
The plugin also contains shell commands that among other things enable deployment using the Elastic Beanstalk client
Dependencies
This plugin requires Grunt ~0.4.5
Getting Started
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 bl-grunt-helper --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('bl-grunt-helper');
The tasks
There is no bl_grunt_helper
-task per se. Instead it is a helper plugin that in turn consists of other tasks.
The following tasks are available
bl-preparetodeploy
, task for preparing the repo before deployment, ensuring that everything is committed and if not a prompt for a commit message is presented.bl-copyfilestobuildpath
, task for copying files to a build pathbl-createdeploymentzip
, task for creating a deployment-zip
Apart from the tasks there are also grunt-exec
commands to execute commands on the command line.
The plugin should be configured to work as expected. The values shown are the default values if no config is supplied.
In the Gruntfile
or in a task set the following configuration values
grunt.config.set("appData", {
appVersion: "0.0.1",
buildPath: "build/app",
appName: "appname"
});
bl-preparetodeploy
This task requires no additional configuration but uses the appVersion
specified in appData
.
bl-copyfilestobuildpath
This task requires the following options to be set
grunt.config.set("bl-copyfilestobuildpath", {
options: {
filesToInclude: [],
patternsToIgnore: [],
preservePath: true
}
});
Patterns to ignore should be a regex to match a src path against. If it matches when copying, the file is ignored.
It also uses the buildPath
specified in appData
bl-createdeploymentzip
This task requires no additional configuration but uses appName
and buildPath
in appData
Shellcommands
The plugin makes certain shell commands available via grunt-exec
. The commands are available in tasks/shellcommands.js
Tests
Currently there are no tests
Contributing
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.
Release History
(Nothing yet)