stop gulp from changing shell/cmd title name

允我心安 提交于 2020-01-12 07:27:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!