diff --git a/packages/angular-cli/commands/completion.js b/packages/angular-cli/commands/completion.js deleted file mode 100644 index 35f2a466df46..000000000000 --- a/packages/angular-cli/commands/completion.js +++ /dev/null @@ -1,18 +0,0 @@ -/*eslint-disable no-console */ -'use strict'; - -var Command = require('ember-cli/lib/models/command'); -var path = require('path'); -var fs = require('fs'); - -module.exports = Command.extend({ - name: 'completion', - description: 'Adds autocomplete functionality to `ng` commands and subcommands', - works: 'everywhere', - run: function() { - var scriptPath = path.resolve(__dirname, '..', 'utilities', 'completion.sh'); - var scriptOutput = fs.readFileSync(scriptPath, 'utf8'); - - console.log(scriptOutput); - } -}); diff --git a/packages/angular-cli/commands/completion.ts b/packages/angular-cli/commands/completion.ts new file mode 100644 index 000000000000..57e004cfbdd3 --- /dev/null +++ b/packages/angular-cli/commands/completion.ts @@ -0,0 +1,18 @@ +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; diff --git a/packages/angular-cli/commands/help.ts b/packages/angular-cli/commands/help.ts index b87c2cd9bbde..85d42bc12c6d 100644 --- a/packages/angular-cli/commands/help.ts +++ b/packages/angular-cli/commands/help.ts @@ -6,10 +6,8 @@ const stringUtils = require('ember-cli-string-utils'); const lookupCommand = require('ember-cli/lib/cli/lookup-command'); const commandsToIgnore = [ - 'help', 'easter-egg', - 'completion', - 'github-pages-deploy' + 'github-pages-deploy' // errors because there is no base github-pages command ]; const HelpCommand = Command.extend({ @@ -21,8 +19,8 @@ const HelpCommand = Command.extend({ run: function (commandOptions: any) { let commandFiles = fs.readdirSync(__dirname) - // Remove files that are not JavaScript - .filter(file => file.match(/\.js$/)) + // Remove files that are not JavaScript or Typescript + .filter(file => file.match(/\.(j|t)s$/) && !file.match(/\.d.ts$/)) .map(file => path.parse(file).name) .map(file => file.toLowerCase());