6 Star 27 Fork 5

hiisea/elux-vue-antd-admin-fork

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.docs.js 882 Bytes
一键复制 编辑 原始数据 按行查看 历史
hiisea 提交于 2022-07-23 13:18 . feat: 基本完成
const fs = require('fs');
const path = require('path');
const {marked} = require('marked');
const md = fs.readFileSync(path.join(__dirname, 'readme.md'), 'utf-8').toString();
const html = marked.parse(md);
fs.writeFileSync(
path.join(__dirname, 'src/modules/dashboard/views/Workplace/summary.html'),
html.replace(/<a href="http:\/\/admin-react-antd.eluxjs.com(\/.*?)">(.+?)<\/a>/g, (str, url, text) => {
return `<Link to="${url}" action="push" target="${url.indexOf('__c=_dialog') > -1 ? 'window' : 'page'}">${text}</Link>`;
})
.replace(/<pre>([\w\W]*?)<\/pre>/g, (str, code) => {
return `<pre v-html={\`${code.replace(/`/g, '\\`')}\`} />`;
})
.replace(/ align="center"/, '')
.replace(/<img ([^>]*?)>/g, '<img $1 />')
.replace(/public\/client\/imgs\//g, '/client/imgs/')
);
console.log('src/modules/dashboard/views/Workplace/summary.html');
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/hiisea/elux-vue-antd-admin-fork.git
git@gitee.com:hiisea/elux-vue-antd-admin-fork.git
hiisea
elux-vue-antd-admin-fork
elux-vue-antd-admin-fork
main

搜索帮助