@dojo/cli
Version:
29 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* The Helper that is passed to each command's 'run' function. Provides
* a 'context' object that can be used to share data between tasks and
* a CommandHelper that allows tasks to 'run' and check the existance of
* other tasks.
*/
class HelperFactory {
constructor(commandHelper, yargs, context, configurationFactory, validate) {
this.command = commandHelper;
this.yargs = yargs;
this.context = context;
this.configurationFactory = configurationFactory;
this.validate = validate;
}
sandbox(groupName, commandName) {
return {
command: this.command,
yargs: this.yargs,
context: this.context,
configuration: this.configurationFactory.sandbox(groupName, commandName),
validation: this.validate
};
}
}
exports.HelperFactory = HelperFactory;
exports.default = HelperFactory;
//# sourceMappingURL=Helper.js.map