问题
When gulp is called the it changes my cmd (windows) title to: "gulp"
I want the window name to stay as it was
I know I can use https://www.npmjs.com/package/gulp-shell but this seems like an overkill
I mean that if I call batch script
title mytitle
gulp .
the window's title is "gulp" and not "mytitle"
回答1:
Use process.title
as stated in this issue : concat process.title instead of overwrite. You shoud use process.cwd()
to get the directory where the gulpfile is running.
somewhere in your gulpfile, according to your need, write:
process.title = process.cwd();
来源:https://stackoverflow.com/questions/39081209/stop-gulp-from-changing-shell-cmd-title-name