open-image
Version:
Open/view an image
16 lines (10 loc) • 1.11 kB
JavaScript
;
require("@babel/polyfill");
var _meow = _interopRequireDefault(require("meow"));
var _chalk = _interopRequireDefault(require("chalk"));
var _ = _interopRequireDefault(require("."));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var cli = (0, _meow.default)("\n ".concat(_chalk.default.dim.underline('Usage:'), "\n ").concat(_chalk.default.dim('$'), " ").concat(_chalk.default.green('open-image'), " ").concat(_chalk.default.yellow('<image-path>'), "\n\n ").concat(_chalk.default.yellow('<image-path>'), " ").concat(_chalk.default.dim('can be a filesystem path or url to the image'), "\n\n ").concat(_chalk.default.dim.underline('Examples:'), "\n ").concat(_chalk.default.dim('$'), " ").concat(_chalk.default.green('open-image'), " ").concat(_chalk.default.yellow('sample-image.jpg'), "\n ").concat(_chalk.default.dim('$'), " ").concat(_chalk.default.green('open-image'), " ").concat(_chalk.default.yellow('http://site.com/image.jpg'), "\n"));
var imagePath = cli.input[0];
(0, _.default)(imagePath);