0.2.0 • Published 5 years ago

api-sorter v0.2.0

Weekly downloads
6
License
-
Repository
-
Last release
5 years ago

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: .

apiSorter will return a Promise.

apiSorter.sort(AST)

AST

Get Markdown AST using unified and remark-parse.

it will return sorted AST.