Skip to content

Commit

Permalink
docs(renew): Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinerer committed Sep 29, 2024
1 parent 9b4a4c1 commit 3ebd8e5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
4 changes: 4 additions & 0 deletions plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# gulp plugins

gulp插件库

8 changes: 8 additions & 0 deletions plugins/renew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions plugins/renew/README.zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# gulp-renew

[ [English](./README.md) | [中文](./README.zh_CN.md) ]



支持字符串批量替换插件。
替换规则支持正则表达式和函数替换。

Expand Down Expand Up @@ -46,6 +50,7 @@ renew(replacements[, options])
### replacements

包含要进行替换的规则。每个规则是一个对象,包含 search 和 replacement 属性

`type`: `Array<{ search: string | RegExp, replacement: string | Function }>`

- `search`:要搜索的字符串或正则表达式。
Expand All @@ -54,12 +59,15 @@ renew(replacements[, options])
### options

选项

`Type`: `Object`

#### `options.skipBinary`

是否跳过二进制文件。

`Type`: `boolean`

`Default`: `true`

如果 `skipBinary` 选项设置为 `true`,插件将不会处理二进制文件。
Expand Down
9 changes: 6 additions & 3 deletions plugins/renew/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 <[email protected]>",
"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/"
Expand All @@ -36,4 +39,4 @@
"istextorbinary": "^9.5.0",
"replacestream": "^4.0.3"
}
}
}

0 comments on commit 3ebd8e5

Please sign in to comment.