@rushstack/heft
Version:
Build all your JavaScript projects the same way: A way that works.
21 lines • 1.03 kB
JavaScript
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import { AliasCommandLineAction } from '@rushstack/ts-command-line';
export class AliasAction extends AliasCommandLineAction {
constructor(options) {
super(options);
this._toolFilename = options.toolFilename;
this._terminal = options.terminal;
}
async onExecuteAsync() {
const toolFilename = this._toolFilename;
const actionName = this.actionName;
const targetAction = this.targetAction;
const defaultParameters = this.defaultParameters;
const defaultParametersString = defaultParameters.join(' ');
this._terminal.writeLine(`The "${toolFilename} ${actionName}" alias was expanded to "${toolFilename} ${targetAction.actionName}` +
`${defaultParametersString ? ` ${defaultParametersString}` : ''}".`);
await super.onExecuteAsync();
}
}
//# sourceMappingURL=AliasAction.js.map