You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where `create-readme` is your script to generate `README.md`, e.g.
78
+
`--check` attributes makes Gitdown check if the target file differes from the source template. If the file differs then the program exits with an error code and message:
Where `create-readme` is your script to generate `README.md`, e.g.
692
+
`--check` attributes makes Gitdown check if the target file differes from the source template. If the file differs then the program exits with an error code and message:
Copy file name to clipboardExpand all lines: src/bin/index.js
+29-7Lines changed: 29 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,13 @@ const argv = yargs
9
9
.usage('Usage: $0 <README.md> [options]')
10
10
.demand(1,1,'Gitdown program must be executed with exactly one non-option argument.')
11
11
.options({
12
+
check: {
13
+
default: false,
14
+
description: 'Checks if the destination file represents the current state of the template. Terminates program with exit status 1 if generating a new document would result in changes of the target document. Terminates program with exit status 0 otherwise (without writng to the destination).',
15
+
type: 'boolean'
16
+
},
12
17
force: {
13
18
default: false,
14
-
demand: false,
15
19
describe: 'Write to file with different extension than ".md".',
0 commit comments