Grunt to warn developers of a Friday deployment
This plugin requires Grunt >=1.5.2
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-warn-friday --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-warn-friday');
In your project's Gruntfile, add a section named warn_friday
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
warn_friday: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
});
Type: Number
Default value: 5
The value considered to be a Friday. Something between 0 and 6. See MDN.
Type: Boolean
Default value: true
Causes the task to fail if the deployment falls on a given options.friday
.
Type: String
Default value: 'templates/deploy_friday.txt'
A String value which points to the template to show when the deployments falls on a given options.friday
.
Type: String
Default value: red
Color of the warning message.
Type: String
Default value: 'templates/all_ok.txt'
A String value which points to the template to show when the deployments does not fall on a given options.friday
.
Type: String
Default value: green
Color of the 'all ok' message.
Use with the options defined above!
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.