Skip to content

if12/api-sorter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-sorter

#7856 for more information

Used by antd and uform.

Installation

npm install api-sorter

Usage

const apiSorter = require('api-sorter');
apiSorter({ file: 'components/**/index.+(zh-CN|en-US).md' }).then(() => {
  console.log('Sorted API successfully!');
});

API

apiSorter({ file, [dest] })

file

Type: Array string

Required: true

dest

Type: string

Required: false

Default: .

It will return a Promise.

apiSorter.sort(AST)

AST

Get Markdown AST using unified and remark-parse.

It will return sorted AST.