Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
HcySunYang committed Oct 25, 2018
1 parent bf897e8 commit 8f4eded
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ The output directory of the markdown file, note: `markdownDir` is based on `outd
#### genType

* Type: `string`
* Default: ``
* Default: `''`

Select the target to generate.
Select the target to generate, can be either `'docute'` or `'markdown'`, if you don't specify `genType`, vuese will ask you 馃構.

#### title

* Type: `string`
* Default: ``
* Default: `''`

Sidbar title, note: when `genType === 'docute'` can optionally.
If you want to generate a `docute` document, you need to specify the sidbar title, if you don't specify `title`, vuese will ask you too 馃構.

### Used in nodejs

Expand Down
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cli.command('gen', 'Generate target resources', async (input, flags) => {
const config = await getConfig(flags)
const questions = require('./questions')
if (['docute', 'markdown'].indexOf(config.genType) < 0) {
const {genType} = await require('inquirer').prompt(questions)
const { genType } = await require('inquirer').prompt(questions)
config.genType = genType
}
if (config.genType === 'docute') require('../lib/genDocute')(config)
Expand Down
6 changes: 3 additions & 3 deletions lib/templates/docute/sao.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = (options) => {
const {title} = options
const { title, componentNames, markdownDir } = options
const config = {
data (answers) {
return {
title: title || answers.title,
componentNames: options.componentNames,
markdownDir: options.markdownDir
componentNames,
markdownDir
}
}
}
Expand Down

0 comments on commit 8f4eded

Please sign in to comment.