ZEST / base.gruntrunner / Module: tasks/observe

tasks/observe

require("tasks/observe")(grunt, gruntModuleDirectory)

this function registers a grunt task to run tests (and optionally documentation) on file changes. The below tasks are created

  • watch:lib for watching lib file changes and running lib-queue when files change
  • watch:test for watching test file changes and running test-queue when files change. This task is only available if test files exist.
  • watch:build for watching build file changes and running build-queue when files change
  • lib-queue which runs the jshint and test scripts for lib files. If docs option is set, instead of jshint and test scripts, the documentation script is run.
  • test-queue which runs the jshint script for lib files and test scripts. If the test files do not exist, this script is not generated.
  • build-queue which runs the jshint and test scripts for build files
  • watch watches for lib, test and script changes together
  • observe runs the initial list of tasks and starts the watch
  • deafault is an alias for observe
Parameters:
Name Type Description
grunt *

the grunt object

gruntModuleDirectory string

the directory where the grunt modules are located

Source:

this module registers a grunt task to run tests (and optionally documentation) on file changes.

Source:

Requires