yeoman: grunt server waiting… can't go back to

2019-03-28 06:13发布

问题:

I installed yeoman, and trying use command: grunt server to preview my application. everything is fine except when i try to get back to command line to continue typing in some commands, below is the status after i run grunt server:

Running "autoprefixer:dist" (autoprefixer) task
Prefixed file ".tmp/styles/main.css" created.

Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:9000.

Running "watch" task
Waiting...

does anybody know how to stop it?

回答1:

This is intentional; the Yeoman generated grunt server command gives you a complete testing environment so that you can have files being compiled and a server to preview your app on. If you stop it, you'll have to start it again with the same command. I'd recommend using something like http://www.iterm2.com/ if you're on a Mac so that you can keep the process running in a separate window, that way you don't have to keep stopping/starting it.

Nonetheless, you can stop the task at any time with CTRL + C.