408 sao GitHub và vẫn tăng — gulpjs/gulp-cli là dự án JavaScript mà TopGit đang theo dõi trên nền tảng. Command Line Interface for gulp.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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 JavaScript variant languages in 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.js, .gulp.ts). You can find a list of supported JavaScript variant languages in Interpret.
A configuration file from the current working directory (cwd) or above are selected before a configuration file from the home directory (~).
Supported configurations properties:
Property
Description
description
Top-level description of the project/gulpfile (Replaces "Tasks for ~/path/of/gulpfile.js")
gulpfile
Set a default gulpfile
preload
An array of modules to preload before running the gulpfile. Any relative paths will be resolved against the --cwd directory (if you don't want that behavior, use absolute paths)
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.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.silent
Silence logging by default
flags.series
Run tasks given on the CLI in series (the default is parallel)
message(data)
A function used to translate messages that pass through gulp-cli. Can receive an object like { tag: Symbol(), ...props } where the tag is a symbol from @gulpjs/messages. The string returned from this function will be logged. If false is explicitly returned, no message will be logged.
timestamp(data)
A function used to provide timestamps for gulp-cli. Can receive an object like { tag: Symbol(), ...props } where the tag is a symbol from @gulpjs/messages. The string returned from this function will be output before any messages. If false is explicitly returned, no timestamp will be output.
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.
--preload [path]
Will preload 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 preloads (with the `--preload` flag) will be from here.
--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.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/gulpjs/gulp-cli là nguồn chính thức.
gulpjs/gulp-cli có bao nhiêu sao?
gulpjs/gulp-cli có 408 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/gulpjs/gulp-cli. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
gulpjs/gulp-cli có những chủ đề gì?
GitHub topics của gulpjs/gulp-cli: "cli", "command-line", "gulp", "javascript". TopGit xếp repo vào nhóm Developer Tools.
gulpjs/gulp-cli có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho gulpjs/gulp-cli. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
gulpjs/gulp-cli còn đang phát triển không?
Commit gần nhất trên gulpjs/gulp-cli là 1.2 năm trước (theo timestamp GitHub). Repo có 111 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
gulpjs/gulp-cli dùng license gì?
gulpjs/gulp-cli phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
gulpjs/gulp-cli viết bằng ngôn ngữ gì?
gulpjs/gulp-cli chủ yếu viết bằng JavaScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
gulp-cli có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về gulp-cli.