metalsmith-regex-replace:一个Metalsmith插件,用于在源文件中执行文本搜索和替换

时间:2021-05-10 15:09:38
【文件属性】:
文件名称:metalsmith-regex-replace:一个Metalsmith插件,用于在源文件中执行文本搜索和替换
文件大小:58KB
文件格式:ZIP
更新时间:2021-05-10 15:09:38
JavaScript Metalsmith-regex-replace 一个Metalsmith插件,用于在源文件中执行文本搜索和替换 该插件允许指定在Metalsmith构建期间要执行的一对搜索/替换操作的列表。 这可用于修复常见的错字,检查NSFW文本,隐藏敏感信息等。 安装 npm install metalsmith-regex-replace 用法 该插件需要一个带有称为subs的键的对象,该对象包含一个带replace键的replace对象数组,这些键用于search和replace 。 搜索 类型: string或RegExp 代替 类型: string或function 如果使用函数作为replace参数,则它应具有String.prototype.replace ( )中描述的签名。 例子 { subs : [ { search : "some text or si
【文件预览】:
metalsmith-regex-replace-master
----.gitignore(88B)
----package.json(610B)
----Makefile(727B)
----package-lock.json(19KB)
----src()
--------loader.js(454B)
--------plugin.js(442B)
--------replace.js(3KB)
--------config.js(371B)
----.travis.yml(491B)
----LICENSE(1KB)
----README.md(6KB)
----.gitattributes(12B)
----test()
--------test.js(11KB)
--------fixtures()
----.editorconfig(221B)
----yarn.lock(49KB)

网友评论