Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed May 25, 2024
1 parent 239bce7 commit 7824665
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 154 deletions.
1 change: 1 addition & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import chalk from 'chalk';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

Expand Down
6 changes: 4 additions & 2 deletions src/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getCrowdin } from './utils.js';
import chalk from 'chalk';
import axios from 'axios';

async function configureCli(name, commandOptions, command) {
async function configureCli(_name, commandOptions, _command) {
const options = commandOptions.opts();

const questions = [{
Expand Down Expand Up @@ -170,7 +170,9 @@ async function configureCli(name, commandOptions, command) {
const answers = await inquirer.prompt(questions);

console.log(chalk.hex('#FFA500').bold('\nYou can now execute the harvest command by running:\n'));
console.log(chalk.green(`crowdin-context-harvester `) +

console.log(
chalk.green(`crowdin-context-harvester `) +
chalk.blue('harvest ') +
(answers.org ? chalk.yellow('--org=') + chalk.white(`"${answers.org}" `) : '') +
(answers.token ? chalk.yellow('--token=') + chalk.white(`"${answers.token}" `) : '') +
Expand Down
Loading

0 comments on commit 7824665

Please sign in to comment.