Skip to content

Commit df8f18a

Browse files
committed
Docs: Improve readme & manpage
1 parent ae2aaa4 commit df8f18a

File tree

3 files changed

+73
-18
lines changed

3 files changed

+73
-18
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,26 @@ Command Line Utility for Gulp
1313
## Usage
1414

1515
```bash
16-
> gulp [options] tasks
16+
> gulp [flags] tasks
1717
```
1818

19-
## Options
19+
## Tasks
20+
21+
Tasks can be executed by running `gulp <task> <othertask>`. Just running `gulp` will execute the task you registered called `default`. If there is no `default` task, gulp will error.
22+
23+
## Compilers
24+
25+
You can find a list of supported languages at https://github.com/js-cli/js-interpret. If you would like to add support for a new language, send pull requests/open issues on that project.
26+
27+
## Environment
28+
29+
The CLI adds process.env.INIT_CWD which is the original cwd it was launched from.
30+
31+
## Flags
32+
33+
gulp has very few flags to know about. All other flags are for tasks to use if needed.
34+
35+
__Some flags only work with gulp 4 and will be ignored when invoked against gulp 3.__
2036

2137
<table>
2238
<thead>

docs/CLI.md

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,63 @@
1-
## gulp CLI docs
1+
### Usage
2+
3+
gulp [flags] tasks
4+
5+
### Tasks
6+
7+
Tasks can be executed by running `gulp <task> <othertask>`. Just running `gulp` will execute the task you registered called `default`. If there is no `default` task, gulp will error.
8+
9+
### Compilers
10+
11+
You can find a list of supported languages at https://github.com/js-cli/js-interpret. If you would like to add support for a new language, send pull requests/open issues on that project.
12+
13+
### Environment
14+
15+
The CLI adds process.env.INIT_CWD which is the original cwd it was launched from.
216

317
### Flags
418

519
gulp has very few flags to know about. All other flags are for tasks to use if needed.
620

7-
- `-v` or `--version` will display the global and local gulp versions
8-
- `--require <module path>` will require a module before running the gulpfile. This is useful for transpilers but also has other applications. You can use multiple `--require` flags
9-
- `--gulpfile <gulpfile path>` will manually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well
10-
- `--cwd <dir path>` will manually set the CWD. The search for the gulpfile, as well as the relativity of all requires will be from here
11-
- `-T` or `--tasks` will display the task dependency tree for the loaded gulpfile
12-
- `--tasks-simple` will display a plaintext list of tasks for the loaded gulpfile
13-
- `--color` will force gulp and gulp plugins to display colors even when no color support is detected
14-
- `--no-color` will force gulp and gulp plugins to not display colors even when color support is detected
15-
- `--silent` will disable all gulp logging
21+
**Some flags only work with gulp 4 and will be ignored when invoked against gulp 3.**
1622

17-
The CLI adds process.env.INIT_CWD which is the original cwd it was launched from.
23+
**--help**, **-h**
24+
Show the help.
1825

19-
### Tasks
26+
**--version**, **-v**
27+
Print the global and local gulp versions.
2028

21-
Tasks can be executed by running `gulp <task> <othertask>`. Just running `gulp` will execute the task you registered called `default`. If there is no `default` task gulp will error.
29+
**--require** [path]
30+
Will require a module before running the gulpfile. This is useful for transpilers but also has other applications.
2231

23-
### Compilers
32+
**--gulpfile** [path]
33+
Manually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well.
34+
35+
**--cwd** [path]
36+
Manually set the CWD. The search for the gulpfile, as well as the relativity of all requires will be from here.
37+
38+
**--verify** [path (optional)]
39+
Will verify plugins referenced in project's package.json against the plugins blacklist.
40+
41+
**--tasks**, **-T**
42+
Print the task dependency tree for the loaded gulpfile.
43+
44+
**--tasks-simple**
45+
Print a plaintext list of tasks for the loaded gulpfile.
46+
47+
**--tasks-json** [path]
48+
Print the task dependency tree, in JSON format, for the loaded gulpfile. The [path] argument is optional, and if given writes the JSON to the path.
49+
50+
**--color**
51+
Will force gulp and gulp plugins to display colors, even when no color support is detected.
52+
53+
**--no-color**
54+
Will force gulp and gulp plugins to not display colors, even when color support is detected.
55+
56+
**--silent**, **-S**
57+
Suppress all gulp logging.
58+
59+
**--continue**
60+
Continue execution of tasks upon failure.
2461

25-
You can find a list of supported languages at [interpret](https://github.com/tkellen/node-interpret#jsvariants). If you would like to add support for a new language send pull request/open issues there.
62+
**--log-level**, **-L**
63+
Set the loglevel. -L for least verbose and -LLLL for most verbose. -LLL is default.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"index.js",
2020
"lib",
2121
"bin",
22-
"completion"
22+
"completion",
23+
"gulp.1"
2324
],
2425
"scripts": {
2526
"coveralls": "lab -r lcov | coveralls",

0 commit comments

Comments
 (0)