This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(async () => { | |
// 配置 | |
//是否下载储存在语雀上的图片 | |
const DOWNLOAD_IMAGE = true; | |
// 修改 markdown 的图片路径 | |
// 示例:MARKDOWN_IMAGE_PATH = "/image/"; | |
// 效果:![](foo.png) -> ![](/image/foo.png) | |
const MARKDOWN_IMAGE_PATH = ""; | |
// 知识库,没配置就下载全部知识库,配置了就只下载该知识库 | |
const KNOWLEDGES = ['算法小结']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printWebpackConfig(config) { | |
console.log(JSON.stringify(config, (key, value) => { | |
// 如果属性值是正则表达式,则返回正则表达式的字符串形式 | |
if (value instanceof RegExp) { | |
return value.source; | |
} | |
// 如果属性值是函数,则返回函数的字符串形式 | |
if (typeof value === 'function') { | |
return value.toString(); | |
} |