From 3ebd8e550e047b6c00433afbbb9d59e7afd34c13 Mon Sep 17 00:00:00 2001 From: Mervin Date: Sun, 29 Sep 2024 16:03:37 +0800 Subject: [PATCH] docs(renew): Update README --- plugins/README.md | 4 ++++ plugins/renew/README.md | 8 ++++++++ plugins/renew/README.zh_CN.md | 8 ++++++++ plugins/renew/package.json | 9 ++++++--- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 plugins/README.md diff --git a/plugins/README.md b/plugins/README.md new file mode 100644 index 0000000..8a2a584 --- /dev/null +++ b/plugins/README.md @@ -0,0 +1,4 @@ +# gulp plugins + +gulp插件库 + diff --git a/plugins/renew/README.md b/plugins/renew/README.md index 2c927a0..7ab0756 100644 --- a/plugins/renew/README.md +++ b/plugins/renew/README.md @@ -6,6 +6,10 @@ [![node.js](https://img.shields.io/node/v/gulp-renew?style=flat-square&logo=nodedotjs)](https://nodejs.org/en/about/releases/) [![license](https://img.shields.io/npm/l/gulp-renew?style=flat-square)](https://github.com/Meqn/pipflow) +[ [English](./README.md) | [中文](./README.zh_CN.md) ] + + + A plugin that supports batch string replacement for gulp. Replacement rules support regular expressions and function replacements. @@ -52,6 +56,7 @@ renew(replacements[, options]) ### replacements Contains the rules for replacement. Each rule is an object containing the search and replacement properties. + `type`: `Array<{ search: string | RegExp, replacement: string | Function }>` - `search`:The string or regular expression to search for. @@ -60,12 +65,15 @@ Contains the rules for replacement. Each rule is an object containing the search ### options Options. + `Type`: `Object` #### `options.skipBinary` Whether to skip binary files. + `Type`: `boolean` + `Default`: `true` Skip binary files. This option is true by default. If you want to replace content in binary files, you must explicitly set it to false. diff --git a/plugins/renew/README.zh_CN.md b/plugins/renew/README.zh_CN.md index 46d09c6..4a66121 100644 --- a/plugins/renew/README.zh_CN.md +++ b/plugins/renew/README.zh_CN.md @@ -1,5 +1,9 @@ # gulp-renew +[ [English](./README.md) | [中文](./README.zh_CN.md) ] + + + 支持字符串批量替换插件。 替换规则支持正则表达式和函数替换。 @@ -46,6 +50,7 @@ renew(replacements[, options]) ### replacements 包含要进行替换的规则。每个规则是一个对象,包含 search 和 replacement 属性 + `type`: `Array<{ search: string | RegExp, replacement: string | Function }>` - `search`:要搜索的字符串或正则表达式。 @@ -54,12 +59,15 @@ renew(replacements[, options]) ### options 选项 + `Type`: `Object` #### `options.skipBinary` 是否跳过二进制文件。 + `Type`: `boolean` + `Default`: `true` 如果 `skipBinary` 选项设置为 `true`,插件将不会处理二进制文件。 diff --git a/plugins/renew/package.json b/plugins/renew/package.json index 31e7a13..2c9f7b8 100644 --- a/plugins/renew/package.json +++ b/plugins/renew/package.json @@ -4,6 +4,9 @@ "description": "A plugin that supports batch string replacement for gulp. Replacement rules support regular expressions and function replacements", "main": "index.js", "types": "types/index.d.ts", + "engines": { + "node": ">=16.0.0" + }, "files": [ "types", "index.js" @@ -19,14 +22,14 @@ ], "repository": { "type": "git", - "url": "git+https://github.com/meqn/gulp-dataurl.git" + "url": "git+https://github.com/meqn/pipflow.git" }, "author": "Mervin ", "license": "MIT", "bugs": { "url": "https://github.com/meqn/gulp-dataurl/issues" }, - "homepage": "https://github.com/meqn/gulp-dataurl#readme", + "homepage": "https://github.com/Meqn/pipflow/tree/main/plugins/renew#readme", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" @@ -36,4 +39,4 @@ "istextorbinary": "^9.5.0", "replacestream": "^4.0.3" } -} \ No newline at end of file +}