diff2html-cli
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -108,3 +108,6 @@ "use strict"; | ||
var jsUiContent = utils.readFile(jsUiFilePath); | ||
var pageTitle = config.pageTitle; | ||
var pageHeader = config.pageHeader; | ||
return [ | ||
{ searchValue: '<!--diff2html-title-->', replaceValue: pageTitle }, | ||
{ searchValue: '<!--diff2html-css-->', replaceValue: "<style>\n" + cssContent + "\n</style>" }, | ||
@@ -124,2 +127,3 @@ { searchValue: '<!--diff2html-js-ui-->', replaceValue: "<script>\n" + jsUiContent + "\n</script>" }, | ||
}, | ||
{ searchValue: '<!--diff2html-header-->', replaceValue: pageHeader }, | ||
{ searchValue: '<!--diff2html-diff-->', replaceValue: diffHTMLContent }, | ||
@@ -126,0 +130,0 @@ ].reduce(function (previousValue, replacement) { |
@@ -33,2 +33,4 @@ "use strict"; | ||
}; | ||
var defaultPageTitle = 'Diff to HTML by rtfpessoa'; | ||
var defaultPageHeader = 'Diff to HTML by <a href="https://github.com/rtfpessoa">rtfpessoa</a>'; | ||
var defaultWrapperTemplate = path_1.default.resolve(__dirname, '..', 'template.html'); | ||
@@ -45,2 +47,4 @@ var configuration = { | ||
htmlWrapperTemplate: argv.htmlWrapperTemplate || defaultWrapperTemplate, | ||
pageTitle: argv.pageTitle || defaultPageTitle, | ||
pageHeader: argv.pageTitle || defaultPageHeader, | ||
ignore: argv.ignore || [], | ||
@@ -47,0 +51,0 @@ }; |
@@ -19,4 +19,6 @@ export declare type StyleType = 'line' | 'side'; | ||
htmlWrapperTemplate: string; | ||
pageTitle: string; | ||
pageHeader: string; | ||
ignore: string[]; | ||
}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -22,2 +22,3 @@ import { StyleType, SummaryType, LineMatchingType, FormatType, InputType, OutputType, DiffyType, DiffStyleType } from './types'; | ||
htmlWrapperTemplate?: string; | ||
pageTitle?: string; | ||
ignore?: string[]; | ||
@@ -24,0 +25,0 @@ extraArguments: string[]; |
@@ -38,2 +38,3 @@ "use strict"; | ||
htmlWrapperTemplate: undefined, | ||
pageTitle: undefined, | ||
extraArguments: [], | ||
@@ -177,2 +178,9 @@ }; | ||
}) | ||
.option('title', { | ||
alias: 't', | ||
describe: 'Page title for HTML output', | ||
nargs: 1, | ||
type: 'string', | ||
default: defaults.pageTitle, | ||
}) | ||
.option('ignore', { | ||
@@ -179,0 +187,0 @@ alias: 'ig', |
{ | ||
"name": "diff2html-cli", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"homepage": "https://diff2html.xyz/index.html#cli", | ||
@@ -59,3 +59,2 @@ "description": "Fast Diff to colorized HTML", | ||
"coverage:open": "yarn run test:coverage && open ./coverage/index.html", | ||
"coverage:push": "curl -Ls https://coverage.codacy.com/get.sh | bash", | ||
"validate": "yarn run format:check && yarn run lint:check && yarn run build && yarn run test:coverage", | ||
@@ -62,0 +61,0 @@ "fix": "yarn run format:fix && yarn run lint:fix", |
@@ -89,2 +89,3 @@ # diff2html-cli | ||
| --hwt | --htmlWrapperTemplate | Path to custom template to be rendered when using the `html` output format | `[string]` | | ||
| -t | --title | Page title for `html` output | `[string]` | | ||
| -f | --format | Output format | `html`, `json` | `html` | | ||
@@ -91,0 +92,0 @@ | -i | --input | Diff input source | `file`, `command`, `stdin` | `command` | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69208
800
191