ant-design/scripts/build-common.js
2016-03-10 10:50:38 +08:00

19 lines
469 B
JavaScript

'use strict';
const fs = require('fs');
const R = require('ramda');
const utils = require('./utils');
module.exports = function buildCommon(dirs, outputFile) {
const mds = utils.findMDFile(dirs, true)
.filter((file) => !/install_en\.md$/gi.test(file)); // TODO
let content = 'module.exports = {';
mds.forEach((md) => {
content += `\n '${md}': require('antd-md!../../${md}'),`;
});
content += '\n};';
fs.writeFile(outputFile, content);
};