Skip to content

Commit

Permalink
feat: Log message on success
Browse files Browse the repository at this point in the history
  • Loading branch information
bennycode committed May 24, 2019
1 parent b322e7c commit ab5fa9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,5 @@
"test": "yarn lint && yarn test:node",
"test:node": "nyc jasmine --config=jasmine.json"
},
"version": "0.0.3"
"version": "0.0.4"
}
13 changes: 9 additions & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import program from 'commander';
import path from 'path';

import {writeClient} from './Swaxios';

const {bin, description, name, version} = require('../package.json');
const binName = Object.keys(bin)[0] || name;

Expand All @@ -23,7 +24,11 @@ if (!program.input || !program.output) {
const inputFile = path.resolve(process.cwd(), program.input);
const outputDirectory = path.resolve(process.cwd(), program.output);

writeClient(inputFile, outputDirectory).catch(error => {
console.error(error);
process.exit(1);
});
writeClient(inputFile, outputDirectory)
.then(() => {
console.log(`Created API client in "${outputDirectory}".`);
})
.catch(error => {
console.error(error);
process.exit(1);
});

0 comments on commit ab5fa9a

Please sign in to comment.