```JavaScript
'use strict';

/**
 * A Grunt task that prepares an HTML, JavaScript or Typescript file
 * by inserting or removing tags into marked blocks for each file that matches a source pattern.
 * @type {Object}
 *
 * @see https://www.npmjs.org/package/grunt-file-blocks
 * @see https://github.com/rrharvey/grunt-file-blocks
 */
module.exports = {
    options    : {
        removeAnchors : true,
        cwd           : 'app/AppInspector',
        template      : '<script src="${file}"></script>'
    },
    dev        : {
        src    : 'tpl/index.tpl.html',
        dest   : 'app/AppInspector/index.html',
        blocks : {
            'mocks' : {
                src : 'mocks.js'
            }
        }
    },
    dist       : {
        src    : 'tpl/index-dist.tpl.html',
        dest   : 'dist/AppInspector/index.html',
        blocks : {
            'mocks' : {
                src : 'mocks.js'
            }
        }
    },
    // development junk "clean up"
    production : {
        src     : 'tpl/index.tpl.html',
        dest    : 'app/AppInspector/index.html',
        blocks  : {
            'mocks' : {}
        }
    }
};
```

With this small task we make sure that `app/AppInspector/mock.js` is only used when running in __dev__ mode, e.g. via localhost from `/app/AppInspector/` or `dist/`.
We also keep the __build__ clean.

 * when developing run `grunt dev` or `grunt watch`, this will add the `mock.js` to `app/AppInspector/index.html` and `dist/AppInspector/index.html`.
 * when building for a release run `grunt` or `grunt build` this will clean out usage `mock.js`.