Skip to content

Commit 59470c9

Browse files
Fixing broken hwt option
1 parent edadbde commit 59470c9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ Diff to Html generates pretty HTML diffs from unified and git diff output in you
6363
--lm, --matching Diff line matching type [choices: "lines", "words", "none"] [default: "none"]
6464
--lmt, --matchWordsThreshold Diff line matching word threshold [default: "0.25"]
6565
--lmm, --matchingMaxComparisons Diff line matching maximum line comparisons of a block of changes [default: 2500]
66+
--hwt, --htmlWrapperTemplate Path to custom template to be rendered when using the "html" output format [string]
6667
-f, --format Output format [choices: "html", "json"] [default: "html"]
6768
-d, --diff Diff style [choices: "word", "char"] [default: "word"]
6869
-i, --input Diff input source [choices: "file", "command", "stdin"] [default: "command"]
6970
-o, --output Output destination [choices: "preview", "stdout"] [default: "preview"]
7071
-u, --diffy Upload to diffy.org [choices: "browser", "pbcopy", "print"]
7172
-F, --file Send output to file (overrides output option) [string]
72-
-hwt, --html-wrapper-template Path to custom template to be rendered when using the "html" output format [string]
7373
--version Show version number
7474
-h, --help Show help
7575

@@ -85,7 +85,7 @@ Diff to Html generates pretty HTML diffs from unified and git diff output in you
8585
-> print json format to stdout
8686
diff2html -F my-pretty-diff.html -- -M HEAD~1
8787
-> print to file
88-
diff2html -F my-pretty-diff.html -hwt my-custom-template.html -- -M HEAD~1
88+
diff2html -F my-pretty-diff.html --hwt my-custom-template.html -- -M HEAD~1
8989
-> print to file using custom markup
9090
templates can include the following variables:
9191
`<!--diff2html-css-->` - writes default CSS to page

src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
var defaultTemplate = path.resolve(__dirname, '..', 'dist', 'template.html');
7171
config.wordByWord = (baseConfig.diff === 'word');
7272
config.charByChar = (baseConfig.diff === 'char');
73-
config.template = baseConfig.template || defaultTemplate;
73+
config.template = baseConfig.htmlWrapperTemplate || defaultTemplate;
7474

7575
if (!fs.existsSync(config.template)) {
7676
return callback(new Error('Template (`' + baseConfig.template + '`) not found!'));

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ var argv = yargs.usage('Usage: diff2html [options] -- [diff args]')
131131
})
132132
.options({
133133
'hwt': {
134-
alias: 'html-wrapper-template',
134+
alias: 'htmlWrapperTemplate',
135135
describe: 'Use a custom template when generating markup',
136136
nargs: 1,
137137
type: 'string'

0 commit comments

Comments
 (0)