@dosmond37/firebase-storage-cli
Version:
Upload anything, right from your command line.
31 lines (30 loc) • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const chalk = require("chalk");
const fs = require("fs-extra");
const command_1 = require("@oclif/command");
class ConfigView extends command_1.default {
async run() {
this.parse(ConfigView);
// Check if Config Directory exists, otherwise create directory
await fs.ensureDir(this.config.configDir);
const configPath = path.join(this.config.configDir, 'config.json');
// Attempt to read Configuration Variables, otherwise show error
try {
const userConfig = await fs.readJSON(configPath);
console.dir(userConfig);
}
catch (error) {
this.log(chalk.bold.red('No configuration file found.'));
this.log('Please refer to setup guide in the documentation.');
this.log('You can also run', chalk.bold.underline('fireup config:set -h'), 'to know more.');
}
}
}
exports.default = ConfigView;
ConfigView.description = 'view global config vars';
ConfigView.aliases = ['cv'];
ConfigView.flags = {
help: command_1.flags.help({ char: 'h' }),
};