![]() HelpArg - used to defined the argument used to generate the usage guide. Defaults to console.log and console.error. Logger - used for logging errors or help guide to the console. Ī few additional options have been added: Most of the available options are the same as the options defined by command-line-args. $ node myApp.js users Jeoff users Frank users Daveįor further Option Definition documentation refer to these docs. ![]() $ node myApp.js users=Jeoff users=Frank users=Dave For example: : # (ts-command-line-args_write-markdown_insertCodeBelow file="path/from/markdown/to/file.ts" codeComment="typescript" )Īreas to include from the file that is being inserted can be designated with more markers within the file. You can also surround the inserted code with a triple backticks by including codeComment or codeComment="myLanguage". ![]() Whatever marker you use you must include the file="path/from/markdown/to/file.ts" in that format. : # (ts-command-line-args_write-markdown_insertCodeBelow The default marker (which can be changed if desired) is: : # (ts-command-line-args_write-markdown_insertCodeBelow file="path/from/markdown/to/file.ts" ) To include code markers must be added to your markdown that indicates which file to copy from. Rather than copying code that will likely get out of date you can directly include code that is checked by your compiler as part of your normal build. This is useful for including example code. Markdown generation can also insert some or all of a file into your markdown. (the Markdown Generation section above was generated using write-markdown ) Insert Code InsertCodeAbove defaults to: ': # (ts-command-line-args_write-markdown_insertCodeAbove)'Ĭop圜odeBelow defaults to: '// ts-command-line-args_write-markdown_cop圜odeBelow'Ĭop圜odeAbove defaults to: '// ts-command-line-args_write-markdown_cop圜odeAbove' InsertCodeBelow defaults to: ': # (ts-command-line-args_write-markdown_insertCodeBelow' ![]() ReplaceAbove defaults to: ': #ts-command-line-args_write-markdown_replaceAbove' ReplaceBelow defaults to: ': #ts-command-line-args_write-markdown_replaceBelow' When replacing content removes any more than a single blank lineĭoes not add the 'Markdown Generated by.' footer to the end of the markdown Use '' to refer to the file being processed. Optional message that is printed when markdown verification fails. The path within the config file to load the config from. package.json can be used if jsonPath specified as well Optional config file to load config from. Does not update the file but returns a non zero exit code if the markdown file is not correct. Multiple files can be specified.Įxport name of the 'UsageGuideConfig' object. JsFile to 'require' that has an export with the 'UsageGuideConfig' export. File path to insert must be added at the end of the line and optionally codeComment flag: 'insertToken file="path/toFile.md" codeComment="ts"'Ī marker in the file to insert code above.Ī marker in the file being inserted to say only copy code below this lineĪ marker in the file being inserted to say only copy code above this line Path can be absolute or relative.Ī marker in the file to replace text below.Ī marker in the file to replace text above.Ī marker in the file to insert code below. Without replacement markers the whole file content will be replaced. Write-markdown -m README.MD -j usageGuideConstants.js write-markdown cli options Argument Markers in the document describe where the content should be inserted, existing content betweeen the markers is overwritten. A markdown version of the usage guide can be generated and inserted into an existing markdown document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |