Skip to content

Commit

Permalink
Add a stub trace function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Dent committed Apr 2, 2017
1 parent 032efd0 commit 2c7271a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as App from './application';
import * as chalk from 'chalk';

interface Options extends CSpellApplicationOptions, program.IExportedCommand {}
interface TraceOptions extends App.TraceOptions, program.IExportedCommand {}
// interface InitOptions extends Options {}

function issueEmitter(issue: App.Issue) {
Expand Down Expand Up @@ -75,6 +76,22 @@ program
);
});

program
.command('trace')
.description('Trace words')
.arguments('<words...>')
.option('-c, --config <cspell.json>', 'Configuration file to use. By default cspell looks for cspell.json in the current directory.')
.action((words: string[], options: TraceOptions) => {
showHelp = false;
App.trace(words, options).then(
() => process.exit(0),
(error: AppError) => {
console.error(error.message);
process.exit(1);
}
);
});

/*
program
.command('init')
Expand Down

0 comments on commit 2c7271a

Please sign in to comment.