码迷,mamicode.com
首页 > 其他好文 > 详细

[Tool] Open Multiple Terminal Tabs on npm Start with ttab and npm-run-all

时间:2018-07-10 19:15:58      阅读:260      评论:0      收藏:0      [点我收藏+]

标签:web app   user   users   color   app   bpa   ica   rmi   web   

Often times when developing web applications, you need to open multiple tabs to run different scripts to start the application. This can all be done with one command

In this lesson, you will learn how to start a project and open multiple terminal tabs with one npm script.

Valid for macOS users.

 

Install:

npm i -D ttab npm-run-all

 

  "scripts": {
    "start": "run-s tab:build:js tab:backend open:page",
    "build:js": "echo ‘Webpack dev server started...‘",
    "backend": "echo ‘Backend started...‘",
    "tab:build:js": "ttab -t ‘Build JS‘ npm run build:js",
    "tab:backend": "ttab -t ‘Java Server‘ npm run backend"
  },

When you run ‘npm start‘, it will open two tabs run the FE and BE

[Tool] Open Multiple Terminal Tabs on npm Start with ttab and npm-run-all

标签:web app   user   users   color   app   bpa   ica   rmi   web   

原文地址:https://www.cnblogs.com/Answer1215/p/9290811.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!