Skip to content

Commit

Permalink
feat: checkout from auto-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode authored and luckyadam committed Jan 7, 2020
1 parent d45da9c commit c9a5eaa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/docs-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default function docsAPI (

if (diff) {
const canges = spawn('git', ['status', '-z'])

canges.stdout.on('data', (data) => {
const ss = data.toString().trim().split(/\u0000|\s+/ig)
ss.forEach(s => {
Expand Down Expand Up @@ -339,7 +339,7 @@ export function writeDoc (routepath: string, doc: DocEntry[]) {
const _p = path.parse(routepath)
const Component = childrenMerge(doc, []).find(e => e.name === _p.name) || {}
const ComponentTags = Component.jsTags || []

const apis = { [`${_p.name}`]: ComponentTags }

Component && (Component.members || []).forEach(member => {
Expand Down Expand Up @@ -369,11 +369,11 @@ export function writeDoc (routepath: string, doc: DocEntry[]) {
if (name === _p.name) return undefined
const tags = e.jsTags || []
const md: (string | undefined)[] = []

if (!isFunction(e.flags) && !TaroMethod.includes(e.flags || -1) && !isntTaroMethod.includes(e.flags || -1)) {
console.warn(`WARN: Symbol flags ${e.flags} is missing parse! Watch symbol name:${name}.`)
}

md.push(
`## ${e.name}\n`,
get.since(tags.find(tag => tag.name === 'since')),
Expand Down

0 comments on commit c9a5eaa

Please sign in to comment.