14 lines
416 B
JavaScript
Raw Normal View History

2019-06-27 12:22:54 +08:00
const fs = require('fs');
const chalk = require('chalk');
2019-06-27 12:22:54 +08:00
const json = require('../src/RULES.js');
let content = `# any-rule
正则大全
https://any86.github.io/any-rule/
`;
json.forEach(({title, rule})=>{
content+= `\r\n## ${title}\r\n`;
content+= `\`\`\`javascript\r\n`;
content+= `${rule}\r\n\`\`\`\r\n`;
2019-06-27 12:22:54 +08:00
});
fs.writeFileSync('./README.md',content,'utf-8');
console.log(chalk.green('生成完毕'));