grunt-menu

1.0.2 • Public • Published

grunt-menu

Useful menu interface for listing/executing your configured tasks.

version: 1.0.2

Build Status

About

This plugin is intended to just add a simple menu interface for browsing and eventually executing your configured tasks.

See what it looks like:

Executing plugin example

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:

Setup

npm install grunt-menu --save-dev

If you are using the load-grunt-tasks module to automatically load your Grunt plugins, you are good to go. If that is not the case, the menu may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-menu');

Usage Examples

To invoke the menu just run the grunt menu task:

grunt menu

That's it, a menu interface should appear and allow you to select which task to run.

Multi task mode

If you want to invoke more than one task at once, you can activate the multiple tasks mode:

grunt menu --multi

It will behave like a checkbox list, where you select items using space and run the selected commands with the enter key.

Informative mode

You can configure the menu task to exhibit the description of each task along with its name. It can be configured within you Gruntfile tasks by setting { info: true } in your menu task configuration options or when invoking the Grunt command on shell:

grunt menu --info

Pro tip

Add the menu task as your default task, that way anytime a new person come accross your project they just need to run grunt and have a nice overview of the available tasks.

Just add/replace the following line in your Gruntfile:

grunt.registerTask('default', ['menu']);

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.

License

Copyright (c) 2014 Ruy Adorno. Licensed under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    5
    • latest

Version History

Package Sidebar

Install

npm i grunt-menu

Weekly Downloads

5

Version

1.0.2

License

MIT

Last publish

Collaborators

  • ruyadorno