-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(error): drop ci command and exit with error code
Switch from yargs to commander to prepare newer versions Improve output style
- Loading branch information
Showing
8 changed files
with
276 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
#!/usr/bin/env node | ||
require('../')(); | ||
'use strict'; | ||
|
||
const { program } = require('commander'); | ||
|
||
const { generate } = require('../cmds'); | ||
const { version } = require('../package.json'); | ||
|
||
program.version(version).description('a CLI Tool to generate markdown files for vuepress'); | ||
|
||
program | ||
.description('Generate the md files') | ||
.option('-s, --source <string>', 'Source folder with .js or .ts files', './src') | ||
.option('-d, --dist <string>', 'Destination folder', './documentation') | ||
.option('-f, --folder <string>', 'Folder inside destination folder. Gets overwritten everytime', 'code') | ||
.option('-t, --title <string>', 'Title of your documentation', 'API') | ||
.option('-r, --readme <string>', 'Path to your custom readme') | ||
.option('-e, --exclude <string>', 'Pattern to exclude files/folders (Comma seperated) - *.test.js,exclude.js') | ||
.option( | ||
'-rm, --rmPattern [files...]', | ||
'Pattern when removing files. You can ex- and include files. (glob pattern)', | ||
[] | ||
) | ||
.option('-p, --partials [files...]', 'jsdoc2markdown partial templates (overwrites default ones)', []) | ||
.option('-c, --jsDocConfigPath <string>', 'Path to jsdoc config') | ||
.action(generate); | ||
|
||
program.parse(process.argv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.