UNPKG

keynote-parser2

Version:

A library for parsing Apple Keynote file

25 lines (24 loc) 963 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.cli = void 0; const node_path_1 = __importDefault(require("node:path")); const node_process_1 = __importDefault(require("node:process")); const parse_1 = require("./parse"); const cli = () => { // get input and output args const input = node_process_1.default.argv[2]; const output = node_process_1.default.argv[3] || `${input}.parsed`; // resolve paths according to cwd const cwd = node_process_1.default.cwd(); const inputPath = node_path_1.default.resolve(cwd, input); const outputPath = node_path_1.default.resolve(cwd, output); // parse (0, parse_1.parse)(inputPath, outputPath).catch((error) => { console.error(error); node_process_1.default.exit(1); }); }; exports.cli = cli;