0.2.0 • Published 5 years ago
api-sorter v0.2.0
api-sorter
#7856 for more information
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.