Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "erik", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Start running your client `Jasmine` tests headlessly with `PhantomJS` and `gulp` today.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -47,2 +47,4 @@ # Erik | ||
```js | ||
const SHOULD_WATCH = !!argv.watch; | ||
// Creating an `Erik` object registers several tasks with gulp (all prefixed with 'erik-'). | ||
@@ -57,3 +59,3 @@ new Erik({ | ||
*/ | ||
watch: !!argv.watch, | ||
watch: SHOULD_WATCH, | ||
@@ -107,2 +109,12 @@ /** | ||
}); | ||
// Optionally configure Gulp to watch for spec changes. | ||
gulp.on('task_start', function(e) { | ||
if (e.task === 'erik') { | ||
if (SHOULD_WATCH) { | ||
console.log('Watching testsâ¦'); | ||
gulp.watch(TEST_FILES, ['build-spec-bundle']); | ||
} | ||
} | ||
}); | ||
``` | ||
@@ -120,2 +132,3 @@ | ||
* 1.0.2 Add event-based watch example. | ||
* 1.0.1 Move dependencies to be non-dev dependencies. | ||
@@ -122,0 +135,0 @@ * 1.0.0 Initial release. |
12549
136