If you haven't used Grunt before, be sure to check out
the Getting started guide, as it explains
how to create a Gruntfile as well as
install and use Grunt plugins. Once you're familiar with that process, you may
install this plugin with this command:

npm install grunt-buster

Once the plugin has been installed, it may be enabled inside your Gruntfile
with this line of JavaScript:

In your project's Gruntfile, add a section named buster to the data object
passed into grunt.initConfig(). You then need to define at least one target
for grunt buster to have any effect.

Example of a minimal working configuration:

buster:{

foo:{}

}

The buster object can have an arbitrary number of targets, like foo in the
above example. If you run grunt buster, all targets are executed. If you run
grunt buster:foo, only the foo target is executed.

The above config will for the foo target run buster test with the
argument --config path/to/my/buster.js, and run buster server with the
argument --port 1111, with Growl notifications when the tests complete.

For the bar target, default configuration will be used, and Growl
notifications will be turned off.

It is possible to start one or more Buster.JS servers, PhantomJS instances or
individual Buster.JS test runs by passing Grunt arguments when invoking tasks.

Grunt allows for command line arguments to be passed to multitasks, like so:
grunt task:subtask:argument1:argument2. To pass arguments to, and execute all
subtasks of a multitask, skip the subtask name: grunt task::argument. In
grunt-buster, we use that to gain more granular control over which Buster.JS
components are executed, as described below in this section.

This starts all configured Buster.JS servers, without starting a Phantom.JS
instance nor running any tests.

Note: Grunt will not block the server and phantomjs tasks by default. They
are intended to be used in combination with blocking tasks like
grunt-contrib-watch. If you do not want to run either of the two in
combination with a watch command, you can supply the block argument: