gulp-cli

WebJar for gulp-cli

License

License

MIT
Categories

Categories

CLI User Interface
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

gulp-cli
Last Version

Last Version

2.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

gulp-cli
WebJar for gulp-cli
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/gulpjs/gulp-cli

Download gulp-cli

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/gulp-cli/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>gulp-cli</artifactId>
    <version>2.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/gulp-cli/
implementation 'org.webjars.npm:gulp-cli:2.3.0'
// https://jarcasting.com/artifacts/org.webjars.npm/gulp-cli/
implementation ("org.webjars.npm:gulp-cli:2.3.0")
'org.webjars.npm:gulp-cli:jar:2.3.0'
<dependency org="org.webjars.npm" name="gulp-cli" rev="2.3.0">
  <artifact name="gulp-cli" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='gulp-cli', version='2.3.0')
)
libraryDependencies += "org.webjars.npm" % "gulp-cli" % "2.3.0"
[org.webjars.npm/gulp-cli "2.3.0"]

Dependencies

compile (18)

Group / Artifact Type Version
org.webjars.npm : archy jar [1.0.0,2)
org.webjars.npm : fancy-log jar [1.3.2,2)
org.webjars.npm : semver-greatest-satisfied-range jar [1.1.0,2)
org.webjars.npm : copy-props jar [2.0.1,3)
org.webjars.npm : gulplog jar [1.0.0,2)
org.webjars.npm : isobject jar [3.0.1,4)
org.webjars.npm : array-sort jar [1.0.0,2)
org.webjars.npm : matchdep jar [2.0.0,3)
org.webjars.npm : concat-stream jar [1.6.0,2)
org.webjars.npm : v8flags jar [3.2.0,4)
org.webjars.npm : pretty-hrtime jar [1.0.0,2)
org.webjars.npm : color-support jar [1.1.3,2)
org.webjars.npm : ansi-colors jar [1.0.1,2)
org.webjars.npm : interpret jar [1.4.0,2)
org.webjars.npm : yargs jar [7.1.0,8)
org.webjars.npm : liftoff jar [3.1.0,4)
org.webjars.npm : replace-homedir jar [1.0.0,2)
org.webjars.npm : mute-stdout jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

gulp-cli

NPM version Downloads Build Status AppVeyor Build Status Coveralls Status Gitter chat

Command Line Utility for Gulp

Install

npm install --global gulp-cli

Usage

> gulp [flags] <task> <task>...

Custom Metadata

When listing tasks with the gulp -T command, gulp-cli displays some custom metadata as defined upon task functions. Currently supported properties:

  • task.description - String of the description to display.
function clean() { ... }
clean.description = 'Cleans up generated files.';
  • task.flags - Object with key/value pairs being flag/description to display.
function build() { ... }
build.flags = {
  '--prod': 'Builds in production mode.'
};

Example Usage:

function build() { ... }
build.description = 'Build entire project.';
build.flags = {
  '--prod': 'Builds in production mode (minification, etc).'
};
// gulp 3.x
gulp.task('build', build);
// gulp 4.x
gulp.task(build);

Tasks

The task(s) listed on the command line will be executed. If more than one task is listed, Gulp will execute all of them concurrently, that is, as if they had all been listed as dependencies of a single task.

By default, Gulp does not serialize tasks listed on the command line. If you would like to execute tasks serially, you must specify the --series flag. e.g. gulp clean build --series

Just running gulp will execute the task default. If there is no default task, gulp will error.

Completion

Thanks to the grunt team, specifically Tyler Kellen

To enable tasks auto-completion in shell you should add eval "$(gulp --completion=shell)" in your .shellrc file.

Bash:

Add eval "$(gulp --completion=bash)" to ~/.bashrc.

Zsh:

Add eval "$(gulp --completion=zsh)" to ~/.zshrc.

Powershell:

Add Invoke-Expression ((gulp --completion=powershell) -join [System.Environment]::NewLine) to $PROFILE.

Fish:

Add gulp --completion=fish | source to ~/.config/fish/config.fish.

Compilers

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.

Environment

The CLI adds process.env.INIT_CWD which is the original cwd it was launched from.

Configuration

Configuration is supported through the use of a .gulp.* file (e.g. .gulp.json, .gulp.yml). You can find a list of supported languages at https://github.com/js-cli/js-interpret.

Configuration from the home directory (~) and current working directory (cwd) are merged with cwd taking precedence.

Supported configurations properties:

Property Description
description Top-level description of the project/gulpfile (Replaces "Tasks for ~/path/of/gulpfile.js")
flags.continue Continue execution of tasks upon failure by default.
flags.compactTasks Reduce the output of task dependency tree by default.
flags.tasksDepth Set default depth of task dependency tree.
flags.gulpfile Set a default gulpfile
flags.silent Silence logging by default
flags.series Run tasks given on the CLI in series (the default is parallel)
flags.require An array of modules to require before running the gulpfile. Any relative paths will be resolved against the --cwd directory (if you don't want that behavior, use absolute paths)
flags.nodeFlags An array of flags used to forcibly respawn the process upon startup. For example, if you always want your gulpfiles to run in node's harmony mode, you can set --harmony here

Flags

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

Some flags only work with gulp 4 and will be ignored when invoked against gulp 3.

Flag Short Flag Description
--help -h Show this help.
--version -v Print the global and local gulp versions.
--require [path] Will require a module before running the gulpfile. This is useful for transpilers but also has other applications.
--gulpfile [path] -f Manually set path of gulpfile. Useful if you have multiple gulpfiles. This will set the CWD to the gulpfile directory as well.
--cwd [path] Manually set the CWD. The search for the gulpfile, as well as the relativity of all requires (including the `--require` flag) will be from here.
--verify [path (optional)] Will verify plugins referenced in project's package.json against the plugins blacklist.
--tasks -T Print the task dependency tree for the loaded gulpfile.
--tasks-simple Print a plaintext list of tasks for the loaded gulpfile.
--tasks-json [path] 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.
--tasks-depth [number] Specify the depth of the task dependency tree to print. This flag can be used with --tasks or --tasks-json. (This flag was named --depth before but is deprecated.)
--compact-tasks Reduce the output of task dependency tree by printing only top tasks and their child tasks. This flag can be used with --tasks or --tasks-json.
--sort-tasks Will sort top tasks of task dependency tree. This flag can be used with --tasks.
--color Will force gulp and gulp plugins to display colors, even when no color support is detected.
--no-color Will force gulp and gulp plugins to not display colors, even when color support is detected.
--silent -S Suppress all gulp logging.
--continue Continue execution of tasks upon failure.
--series Run tasks given on the CLI in series (the default is parallel).
--log-level -L Set the loglevel. -L for least verbose and -LLLL for most verbose. -LLL is default.

License

MIT

org.webjars.npm

gulp

A toolkit to automate & enhance your workflow

Versions

Version
2.3.0
2.2.0
2.1.0
1.2.2