Launching Gulp watch into your workflow
As we saw previously, it is super handy to have Travis CI running tests as you push to GitHub. But it is actually pretty slow to wait so long to see whether your tests are passing; better to run it locally before you push. But who can remember to do this? Well, with Gulp, we will see no need to remember it, just run it!
Getting ready
SSH into Homestead using the command homestead ssh
and cd into the recipe directory. Then, let's get going.
How to do it...
Take a moment to run
npm install
from within theapp
directory.Tip
This will take a few minutes! Go get some coffee and welcome to NPM!
While this is running or after it is done, edit
gulpfile.js
, and make it look as follows:Then, run
gulp watch
.Start editing it:
Edit
MarvelApiClientTest.php
, and add an example unit test:Then, you will see something like this at your command line:
Then, go edit
app/MarvelApi.php
, and click on save. Go check out the console, and you will see...