source: Dev/trunk/node_modules/grunt-path-check/README.md @ 531

Last change on this file since 531 was 516, checked in by hendrikvanantwerpen, 11 years ago

Enable deployment with Grunt.

File size: 2.1 KB
Line 
1
2# grunt-path-check
3
4Grunt Task for Checking Existence of Programs on PATH.
5In case a program is not found a warning is issues and
6Grunt by default stop processing until option `--force` is used.
7
8<p/>
9<img src="https://nodei.co/npm/grunt-path-check.png?downloads=true&stars=true" alt=""/>
10
11<p/>
12<img src="https://david-dm.org/rse/grunt-path-check.png" alt=""/>
13
14
15## Getting Started
16
17This plugin requires Grunt `~0.4.0`
18
19If you haven't used [Grunt](http://gruntjs.com/)
20before, be sure to check out the [Getting
21Started](http://gruntjs.com/getting-started) guide, as it explains how
22to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as
23install and use Grunt plugins. Once you're familiar with that process,
24you may install this plugin with this command:
25
26```shell
27npm install grunt-path-check --save-dev
28```
29
30Once the plugin has been installed, it may be enabled inside your
31Gruntfile with this line of JavaScript:
32
33```js
34grunt.loadNpmTasks("grunt-path-check");
35```
36
37## Task Options
38
39- `tasks`: (default `[]`) the names of Grunt tasks to run if
40   the patch check for the `src` programs are successful.
41
42- `mandatory`: (default `true`) whether the
43   patch check for the `src` programs are mandatory, i.e., if they are
44   not successful, stop processing. Set this to `false` in combination
45   with the `tasks` option to execute a task if a program exists or skip
46   a task if a program does not exist.
47
48## Task Usage
49
50_Run this task with the `grunt path-check` command._
51
52Task targets, files and options may be specified according to the Grunt
53[Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
54
55## Usage Example
56
57```js
58// [...]
59grunt.loadNpmTasks("grunt-shell");
60grunt.loadNpmTasks("grunt-path-check");
61grunt.initConfig({
62    "shell": {
63        "generate-txt": {
64            command: "w3m -dump doc.html >doc.txt"
65        }
66    },
67    "path-check": {
68        "generate-txt": {
69            src: [ "w3m" ],
70            options: {
71                mandatory: false,
72                tasks: [ "shell:generate-txt" ]
73            }
74        }
75    }
76});
77grunt.registerTask("default", [ "path-check:generate-txt" ]);
78// [...]
79```
80
Note: See TracBrowser for help on using the repository browser.