#7856 for more information
npm install api-sorter
const apiSorter = require('api-sorter');
apiSorter({ file: 'components/**/index.+(zh-CN|en-US).md' }).then(() => {
console.log('Sorted API successfully!');
});
Type: Array string
Required: true
Type: string
Required: false
Default: .
It will return a Promise
.
Get Markdown AST using unified and remark-parse.
It will return sorted AST.