Giter VIP home page Giter VIP logo

grunt-available-tasks's Introduction

grunt-available-tasks

Want all of your registered tasks in a nice, alphabetized, colour coded list? Think the task list outputted by grunt --help could be more descriptive? grunt-available-tasks to the rescue!

Usage

Once the plugin has been installed via npm install grunt-available-tasks --save-dev, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-available-tasks');

Alternatively, use a plugin such as https://github.com/sindresorhus/load-grunt-tasks; specify require('load-grunt-tasks')(grunt); in your Gruntfile and you don't need a separate line for every plugin you use. Once installed, simply run grunt availabletasks.

Optionally, if you have a long list of tasks and only want to show a subset of those to others who might have cloned your project, you can specify a section in the initConfig to include, or to exclude the tasks you specify. The options are as follows:

Options

options.filter

Type: String Default value: false

Define either 'include', or 'exclude'.

options.tasks

Type: Object Default value: false

The list of tasks to either include or exclude.

options.dimmed

Type: Boolean Default value: true

Whether to grey out availabletasks from the list or not.

Sample configuration

In this project, running availabletasks will exclude jshint and lintspaces and list availabletasks and default. Changing the filter to include would exclude availabletasks and default.

availabletasks: {
    options: {
        filter: 'exclude',
        tasks: ['jshint', 'lintspaces']
    }
}

Output

From left to right, this plugin outputs the task name, the type of the task, then the description and finally a list of multitask targets should you have configured two or more. The type of the task is registered with arrows:

  • > denotes a single target task.
  • -> denotes a multi target task.
  • => denotes a user defined task.

What does it look like?

screenshot

grunt-available-tasks's People

Contributors

ben-eb avatar

Watchers

Navid Nikpour avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.