ant-design/site/bisheng-plugin-antd/lib/node.js
2016-06-03 13:21:27 +08:00

12 lines
332 B
JavaScript

const path = require('path');
const processDoc = require('./process-doc');
const processDemo = require('./process-demo');
module.exports = (markdownData) => {
const isDemo = /\/demo$/i.test(path.dirname(markdownData.meta.filename));
if (isDemo) {
return processDemo(markdownData);
}
return processDoc(markdownData);
};