src/hooks/Context.js
function Context (hook, opts) {
    this.hook = hook;

    // create new object, to avoid affecting input opts in other places
    // For example context.opts.plugin = Object is done, then it affects by reference
    this.opts = Object.assign({}, opts);
    this.cmdLine = process.argv.join(' ');

    // Lazy-load cordova to avoid cyclical dependency
    Object.defineProperty(this, 'cordova', {
        get () { return this.requireCordovaModule('cordova-lib').cordova; }
    });
}
function Context (hook, opts) {
    this.hook = hook;

    // create new object, to avoid affecting input opts in other places
    // For example context.opts.plugin = Object is done, then it affects by reference
    this.opts = Object.assign({}, opts);
    this.cmdLine = process.argv.join(' ');

    // Lazy-load cordova to avoid cyclical dependency
    Object.defineProperty(this, 'cordova', {
        get () { return this.requireCordovaModule('cordova-lib').cordova; }
    });
}
Creates hook script context
@constructor
@param {String} hook The hook type
@param {Object} opts Hook options
@returns {Object}