I have one specific task in my gulpfile that is isolated from the other tasks and never needs to run as part of the rest of the build process. I'd like to put it in a separate gulpfile and execute that on its own.
How can I use gulp
with a gulpfile that has a custom name?
The Getting started document posing as Gulp's docs don't seem to mention the CLI. My search attempts for arguments to the gulp
, mostly brings up results on how to get the command line arguments into the gulp
tasks.
The actual use case is extracting translatable strings in a Docker container, which I don't want to bloat with unnecessary node.js packages.
Gulpfile explained A gulpfile is a file in your project directory titled gulpfile. js (or capitalized as Gulpfile. js , like Makefile), that automatically loads when you run the gulp command.
Run a Gulp Task in Visual Studio CodeType "Run Task" and select it, which will bring up a list of tasks configured in Gulp. Choose the Gulp Task you want to run! Most of your Gulp Tasks will probably be automated using gulp watch, but manual Gulp Tasks can easily be run within Visual Studio Code.
Here is what the gulp CLI docs say:
--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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With