Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,21 @@
/* eslint-disable no-console */
"use strict";

var ora = require('ora');

var theSpinner = ora({
const ora = require('ora');
const theSpinner = ora({
text: 'Loading results',
color: 'cyan'
}).start();

var parseCommandLineArgs = require('./parseCommandLineArgs');

var validateCLIArguments = require('./validateCLIArguments');

var googleIt = require('./main');

var cliOptions = parseCommandLineArgs(process.argv);
var validation = validateCLIArguments(cliOptions);

const parseCommandLineArgs = require('./parseCommandLineArgs');
const validateCLIArguments = require('./validateCLIArguments');
const googleIt = require('./main');
const cliOptions = parseCommandLineArgs(process.argv);
const validation = validateCLIArguments(cliOptions);
if (!validation.valid) {
console.log("Invalid options. Error: ".concat(validation.error));
console.log(`Invalid options. Error: ${validation.error}`);
theSpinner.clear();
} else {
googleIt(cliOptions).then(function () {
googleIt(cliOptions).then(() => {
theSpinner.stop();
theSpinner.clear();
}).catch(console.error);
Expand Down
Loading