I ended up moving the numbers around and that seemed to address the issue. It initially wouldn’t give the message, and instead was using the default img that is included with the script. The difficult part about this was getting the script to return the proper notifications. Because node-notifier wraps around terminal-notifier, you can do anything. I’ll likely not use this for larger projects, or at least implement a count that only runs the tests every so often. If Growl isnt installed, an error will be returned in the callback. That’s not a lot, but if the project was much bigger, say 30-40 tests, I can see this being a dumb idea. There are 669 other projects in the npm registry using gulp-notify. This will likely not be the best way to address phpunit tests, especially since currently there are only 3 tests. Start using gulp-notify in your project by running npm i gulp-notify. Which should return a notification of some sort. You can run gulp, or you can use gulp test : I lost the link to this gist, so it’s removed. Note: Can be edited from host or guest machine, since in my case the gulp file will be at the base of my project folder. I gathered this from a couple of different gulp.js files. Used NPM for this on my Vagrant VM, since this is where gulp will be called: I believe the gulp-notify sends more by default now. These are the numbers that worked for me, YMMV. This is the part where I couldn’t quite get it to work like in the tutorial I included, so I ended up moving around the numbers that were being submitted to the script from gulp. I used homebrew, so I just ran update and installed terminal-notifier: To update your dev-dependencies you must remove the actual version first and install it again. The tests are also running against the VM’s databases, not the local machine, so it makes more sense to keep dev separate from the Host Mac OSX. To solve this weve updated gulp-notify to the actual version 1.3.1. I develop using a Vagrant VM, so while installing most of this stuff on the host machine will work fine, I want it to be mostly kept to the VM. Note: I haven’t really seen anything relating to this other than this, but I couldn’t quite get it to work using his bash script, so I ended up a making a few adjustments to his. I’ve been looking using grunt/gulp for automation of my different tasks, such as css/js minification, and image manipulations so when I found out about automating tests for phpunit, I decided to give a try. It doesn’t freeze, it continues to load, but it is one little weirdness that I’ve found. However, I notice that the server hangs at provisioning on terminal. I can confirm that this does in fact work with homestead and elixir. Stephen Quick Notifications Using Gulp-Notify on Vagrant with Terminal-Notifier
0 Comments
Leave a Reply. |