grunt-wizard
A wizard to select the desired task and options
Getting Started
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-wizard --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "wizard" task
Overview
In your project's Gruntfile, add a section named wizard
to the data object passed into grunt.initConfig()
.
grunt
Options
options.message
Type: String
Default value: 'Choose a task to run'
options.choices
Type: Object|Function
A list of tasks and parameters
Usage Examples
If you just want to see this plugin in action clone the repository and launch grunt:
git clone https://github.com/jantimon/grunt-wizardgrunt
Default Options
In this example, the prompt will ask to choose between nodeunit and jshint:
grunt
Choices function
In this example the result will be the same as in default options however the choices are build up in a function
grunt
Sub parameters
It is also possible to set custom parameter values
grunt
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)
License
Copyright (c) 2014 Jan Nicklas. Licensed under the MIT license.