|
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. |
2 | 16 |
|
3 | 17 | ### Flags
|
4 | 18 |
|
5 | 19 | gulp has very few flags to know about. All other flags are for tasks to use if needed.
|
6 | 20 |
|
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.** |
16 | 22 |
|
17 |
| -The CLI adds process.env.INIT_CWD which is the original cwd it was launched from. |
| 23 | +**--help**, **-h** |
| 24 | + Show the help. |
18 | 25 |
|
19 |
| -### Tasks |
| 26 | +**--version**, **-v** |
| 27 | + Print the global and local gulp versions. |
20 | 28 |
|
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. |
22 | 31 |
|
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. |
24 | 61 |
|
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. |
0 commit comments