UNPKG

@nullcc/diff2html-cli

Version:
37 lines 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = require("path"); function parseArgv(argv) { var diff2htmlOptions = { inputFormat: "diff", outputFormat: argv.style === "side" ? "side-by-side" : "line-by-line", showFiles: argv.summary !== "hidden", matching: argv.matching, matchWordsThreshold: argv.matchWordsThreshold, matchingMaxComparisons: argv.matchingMaxComparisons }; var defaultWrapperTemplate = path.resolve(__dirname, "..", "template.html"); var configuration = { showFilesOpen: argv.summary === "open" || false, synchronisedScroll: argv.synchronisedScroll, formatType: argv.format, outputDestinationType: argv.output, outputDestinationFile: argv.file, inputSource: argv.input, diffyType: argv.diffy, htmlWrapperTemplate: argv.htmlWrapperTemplate || defaultWrapperTemplate, ignore: argv.ignore || [], coverage: argv.coverage, coverageFilePatterns: argv.coverageFilePatterns, workspace: argv.workspace, coverageReporter: argv.coverageReporter, customFileNameGeneratorFile: argv.customFileNameGeneratorFile, displayMode: argv.displayMode, strict: argv.strict, saveDebug: argv.saveDebug, caseInsensitive: argv.caseInsensitive, }; return [diff2htmlOptions, configuration]; } exports.parseArgv = parseArgv; //# sourceMappingURL=configuration.js.map