mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 06:41:45 +08:00
19 lines
530 B
TypeScript
19 lines
530 B
TypeScript
import * as path from 'path';
|
|
import * as fs from 'fs';
|
|
|
|
const Command = require('../ember-cli/lib/models/command');
|
|
|
|
const CompletionCommand = Command.extend({
|
|
name: 'completion',
|
|
description: 'Adds autocomplete functionality to `ng` commands and subcommands',
|
|
works: 'everywhere',
|
|
run: function() {
|
|
const scriptPath = path.resolve(__dirname, '..', 'utilities', 'completion.sh');
|
|
const scriptOutput = fs.readFileSync(scriptPath, 'utf8');
|
|
|
|
console.log(scriptOutput);
|
|
}
|
|
});
|
|
|
|
export default CompletionCommand;
|