grunt-path-check

0.9.4 • Public • Published

grunt-path-check

Grunt Task for Checking Existence of Programs on PATH. In case a program is not found a warning is issues and Grunt by default stop processing until option --force is used.

Getting Started

This plugin requires Grunt ~0.4.0

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-path-check --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks("grunt-path-check");

Task Options

  • tasks: (default []) the names of Grunt tasks to run if the patch check for the src programs are successful.

  • mandatory: (default true) whether the patch check for the src programs are mandatory, i.e., if they are not successful, stop processing. Set this to false in combination with the tasks option to execute a task if a program exists or skip a task if a program does not exist.

Task Usage

Run this task with the grunt path-check command.

Task targets, files and options may be specified according to the Grunt Configuring tasks guide.

Usage Example

// [...]
grunt.loadNpmTasks("grunt-shell");
grunt.loadNpmTasks("grunt-path-check");
grunt.initConfig({
    "shell": {
        "generate-txt": {
            command: "w3m -dump doc.html >doc.txt"
        }
    },
    "path-check": {
        "generate-txt": {
            src: [ "w3m" ],
            options: {
                mandatory: false,
                tasks: [ "shell:generate-txt" ]
            }
        }
    }
});
grunt.registerTask("default", [ "path-check:generate-txt" ]);
// [...]

Package Sidebar

Install

npm i grunt-path-check

Weekly Downloads

2

Version

0.9.4

License

MIT

Unpacked Size

14.6 kB

Total Files

12

Last publish

Collaborators

  • rse