12 lines
423 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');
2019-07-03 16:18:00 +08:00
let content = `# 正则大全
图形界面: https://any86.github.io/any-rule/\r\n`;
2019-06-27 12:22:54 +08:00
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('生成完毕'));