All Projects → gulpjs → Gulp Cli

gulpjs / Gulp Cli

Licence: mit
Command Line Interface for gulp.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Gulp Cli

Kingpin
CONTRIBUTIONS ONLY: A Go (golang) command line and flag parser
Stars: ✭ 3,178 (+815.85%)
Mutual labels:  cli, command-line
Pastel
A command-line tool to generate, analyze, convert and manipulate colors
Stars: ✭ 3,742 (+978.39%)
Mutual labels:  cli, command-line
Define
A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.
Stars: ✭ 298 (-14.12%)
Mutual labels:  cli, command-line
Teip
Select partial standard input and replace with the result of another command efficiently
Stars: ✭ 280 (-19.31%)
Mutual labels:  cli, command-line
Xidel
Command line tool to download and extract data from HTML/XML pages or JSON-APIs, using CSS, XPath 3.0, XQuery 3.0, JSONiq or pattern matching. It can also create new or transformed XML/HTML/JSON documents.
Stars: ✭ 335 (-3.46%)
Mutual labels:  cli, command-line
Doitlive
Because sometimes you need to do it live
Stars: ✭ 3,073 (+785.59%)
Mutual labels:  cli, command-line
Nb
CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
Stars: ✭ 3,846 (+1008.36%)
Mutual labels:  cli, command-line
Arduino Cli
Arduino command line tool
Stars: ✭ 3,173 (+814.41%)
Mutual labels:  cli, command-line
Caporal.js
A full-featured framework for building command line applications (cli) with node.js
Stars: ✭ 3,279 (+844.96%)
Mutual labels:  cli, command-line
Php Console
🖥 PHP CLI application library, provide console argument parse, console controller/command run, color style, user interactive, format information show and more. 功能全面的PHP命令行应用库。提供控制台参数解析, 命令运行,颜色风格输出, 用户信息交互, 特殊格式信息显示
Stars: ✭ 310 (-10.66%)
Mutual labels:  cli, command-line
Onefetch
Git repository summary on your terminal
Stars: ✭ 3,680 (+960.52%)
Mutual labels:  cli, command-line
Go Tea
Tea provides an Elm inspired functional framework for interactive command-line programs.
Stars: ✭ 329 (-5.19%)
Mutual labels:  cli, command-line
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (-22.48%)
Mutual labels:  cli, command-line
Ink
🌈 React for interactive command-line apps
Stars: ✭ 17,505 (+4944.67%)
Mutual labels:  cli, command-line
Picocli
Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
Stars: ✭ 3,286 (+846.97%)
Mutual labels:  cli, command-line
Getopt Php
A PHP library for command-line argument processing
Stars: ✭ 305 (-12.1%)
Mutual labels:  cli, command-line
Imessage
💬 Send iMessages from command-line
Stars: ✭ 261 (-24.78%)
Mutual labels:  cli, command-line
Cliffy
NodeJS Framework for Interactive CLIs
Stars: ✭ 263 (-24.21%)
Mutual labels:  cli, command-line
Whatspup
🔳 WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer
Stars: ✭ 310 (-10.66%)
Mutual labels:  cli, command-line
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+5620.75%)
Mutual labels:  cli, command-line

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].