How to choose directory in command line for Gulp task? #2682
Unanswered
SamuelMiller
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to be able to pass a command line argument to specify what the src directory is within a gulp task.
Right now I have defined a task, convertCase, to look through the whole assets directory to (1) match filenames with any capital letters, (2) delete them, (3) convert names to lowercase, and (4) pipe the result into the same directory. However sometimes, I may want to just run the task on a particular subfolder in assets, such as the image folder.
Specifically, I would like to be able to target a subdirectory in assets, as an option, when I run the task in the terminal.
gulp convertCase
(defaults to matching the whole assets folder, which is what I have now.)Or,
gulp convertCase images
(limits its match to just the images directory within the assets folder).Similarly,
gulp convertCase fonts
(limits task to the fonts folder)Any help is greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions