GULP(1)
π¦ GULP(1) π¦
okay bestie, sit down, hydrate, because we're about to talk about gulp β the General Commands Manual's finest, and honestly? she's iconic. π
π NAME π
gulp β that's it, that's the name. short, sweet, lowercase, main character energy. π
β¨ gulp CLI docs β¨
πΈ Flags πΈ
okay so here's the tea: gulp has very few flags to know about. literally, she's low maintenance. every other flag out there is for tasks to use if they need it, not for the CLI itself. π«Ά
-v,--versionβ shows you the global gulp version and the local gulp version. both. at once. obsessed. β¨--require <module path>β requires a module before running the gulpfile. super useful for transpilers but honestly it has other applications too, iykyk. and yes β you can stack multiple--requireflags. go off. π₯--gulpfile <gulpfile path>β manually sets the path of the gulpfile. perfect if you've got multiple gulpfiles lying around like little collectibles π. heads up: this also sets the CWD to the gulpfile directory. two for one.--cwd <dir path>β manually sets the CWD. from here, the search for the gulpfile happens, and all requires are relative from here too. it's giving home base. π-T,--tasksβ displays the task dependency tree for the loaded gulpfile. it includes the task names and their descriptions. she's thorough π--tasks-simpleβ displays a plaintext list of tasks for the loaded gulpfile. no tree, no drama, just vibes. π--verifyβ verifies the plugins referenced in the project'spackage.jsonagainst the plugins blacklist. safety first bestie β--colorβ forces gulp and gulp plugins to display colors even when no color support is detected. pink is a lifestyle. π--no-colorβ forces gulp and gulp plugins to not display colors even when color support is detected. sometimes we're in our minimal era. π--silentβ disables all gulp logging. not a peep. π
π‘ also: the CLI adds process.env.INIT_CWD, which is the original cwd it was launched from. no cap, remember that one.
πΌ Task specific flags πΌ
want task specific flags? there's a StackOverflow link referenced for exactly how to add those. go check it out, bestie, she's got the answers. π§
π Tasks π
tasks get executed by running:
gulp <task> <task>...
here's the part that catches people off guard, so listen up π«Ά: if you list more than one task, Gulp will execute all of them concurrently β that is, as if they had all been listed as dependencies of a single task.
β οΈ Gulp does NOT serialize tasks listed on the command line. fr fr. if you're coming from other comparable tools, you might expect something likegulp clean buildβ with tasks namedcleanandbuildβ to run one then the other. it will not. the two tasks will be executed concurrently, and you will not get the intended result. this is the plot twist, bestie. π
and if you just run:
gulp
she'll execute the task default. but if there is no default task? gulp will error. periodt. π
π¦ Compilers π¦
you can find a list of supported languages at interpret. want to add support for a new language? send a pull request / open issues over there. they'd love to hear from you, go be the main character. β¨
π Examples π
πΈ Example gulpfile πΈ
gulp.task('one', function(done) {
// do stuff
done();
});
gulp.task('two', function(done) {
// do stuff
done();
});
gulp.task('three', three);
function three(done) {
done();
}
three.description = "This is the description of task three";
gulp.task('four', gulp.series('one', 'two'));
gulp.task('five',
gulp.series('four',
gulp.parallel('three', function(done) {
// do more stuff
done();
})
)
);
π -T or --tasks π
command: gulp -T or gulp --tasks
output:
[20:58:55] Tasks for ~\exampleProject\gulpfile.js
[20:58:55] βββ one
[20:58:55] βββ two
[20:58:55] βββ three This is the description of task three
[20:58:55] βββ¬ four
[20:58:55] β βββ¬ <series>
[20:58:55] β βββ one
[20:58:55] β βββ two
[20:58:55] βββ¬ five
[20:58:55] β βββ¬ <series>
[20:58:55] β βββ¬ four
[20:58:55] β β βββ¬ <series>
[20:58:55] β β βββ one
[20:58:55] β β βββ two
[20:58:55] β βββ¬ <parallel>
[20:58:55] β βββ three
[20:58:55] β βββ <anonymous>
look at that tree. she's branching. she's thriving. π³π
β --tasks-simple β
command: gulp --tasks-simple
output:
one
two
three
four
five
just the names, no notes. clean, minimal, ate. π₯
and that's the whole page, bestie!! this one's from gulp 4.0.2, dated March 2025, straight out of the General Commands Manual. go run a task, slay a build, and remember: concurrency is not serialization. π β¨π¦
π¦ where this page comes from
- debian trixie: gulp 4.0.2+~cs54.26.36-8 Β· MIT
- ubuntu questing: gulp 4.0.2+~cs54.26.36-8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms