vovavictory.blogg.se

Guard livereload windows
Guard livereload windows






guard livereload windows

Next we’re going to add the ‘jasmine-headless-webkit’ gem and its guard twin, which use phantomjs to run your tests on the command line, without needing a browser window. First we grab the excellent Jasmine JavaScript BDD test framework via its gem – you can use the framework of your just but I find Jasmine both pleasant to deal with and it generally Just Works. This just installs a few gems that we’re going to use for our tests. Guard-livereload terminal-notifier-guard -no-rdoc -no-ri

#Guard livereload windows install

Gem install jasmine jasmine-headless-webkit guard-jasmine-headless-webkit guard \ Let’s start by making sure we have all the gems we need:

guard livereload windows guard livereload windows

It has a great ecosystem around it which makes automating filesystem-based triggers both simple and powerful. Guard is a simple ruby gem that scans your file system for changes and runs the code of your choice whenever a file you care about is saved. Because I’ve used a lot of ruby I’m most comfortable using its ecosystem to achieve this, and as it happens there’s a great way to do this already. This was a fantastic way to work, and I wanted to get there again with JavaScript. One of the things I really loved about Rails in the early days was that it introduced me to the concept of autotest – a script that would watch your file system for changes and then automatically execute your unit tests as soon as you change any file.īecause the unit test suite typically executes quickly, you’d tend to have your test results back within a second or two of hitting save, allowing you to remain in the editor the entire time and only break out the browser for deeper debugging – usually the command line output and OS notifications (growl at the time) would be enough to set you straight.








Guard livereload windows