diff --git a/Cargo.lock b/Cargo.lock index 8274ede..922dc64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -632,7 +632,7 @@ dependencies = [ ] [[package]] -name = "farmfe_plugin_yml" +name = "farmfe_plugin_yaml" version = "0.0.1" dependencies = [ "farmfe_core", diff --git a/README.md b/README.md index 95f3110..c1324d2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ | --------------------------------------------- | ------------------------------------------------------------------------------ | | [dsv](packages/dsv) | Converts `.csv` and `.tsv` files into JavaScript modules | | [image](packages/image) | Imports JPG, PNG, GIF, SVG, and WebP files | -| [yml](packages/yaml) | Convert YAML files to ES6 modules | +| [yaml](packages/yaml) | Convert YAML files to ES6 modules | | [react-components](packages/react-components) | On-demand components auto importing for React | | [strip](packages/strip) | Remove `debugger` statements and functions like `assert.equal` from your code. | | [url](packages/url) | Imports files as data-URIs or ES Modules. | diff --git a/packages/yaml/Cargo.toml b/packages/yaml/Cargo.toml index e25bb14..290a0f5 100644 --- a/packages/yaml/Cargo.toml +++ b/packages/yaml/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2021" -name = "farmfe_plugin_yml" +name = "farmfe_plugin_yaml" version = "0.0.1" [lib] diff --git a/packages/yaml/package.json b/packages/yaml/package.json index 9e9b4c6..021b0b8 100644 --- a/packages/yaml/package.json +++ b/packages/yaml/package.json @@ -1,5 +1,5 @@ { - "name": "@farmfe/plugin-yml", + "name": "@farmfe/plugin-yaml", "version": "0.0.1", "private": false, "main": "scripts/index.js", @@ -7,7 +7,7 @@ "type": "module", "license": "MIT", "napi": { - "name": "farm-plugin-yml", + "name": "farm-plugin-yaml", "triples": { "additional": [ "aarch64-apple-darwin", @@ -31,7 +31,7 @@ "dev": "cargo watch -w src -s 'scripts/watch.sh'", "bump": "npx changeset version", "play": "pnpm --filter playground dev", - "build": "farm-plugin-tools build --platform --cargo-name farmfe_plugin_yml -p farmfe_plugin_yml --release", + "build": "farm-plugin-tools build --platform --cargo-name farmfe_plugin_yaml -p farmfe_plugin_yaml --release", "prepublishOnly": "farm-plugin-tools prepublish" }, "files": [ diff --git a/packages/yaml/readme.md b/packages/yaml/readme.md index 91f697f..dac0f31 100644 --- a/packages/yaml/readme.md +++ b/packages/yaml/readme.md @@ -1,4 +1,4 @@ -# @farmfe/plugin-yml +# @farmfe/plugin-yaml Inspired By [@rollup/plugin-yaml](https://www.npmjs.com/package/@rollup/plugin-yaml) @@ -7,7 +7,7 @@ Inspired By [@rollup/plugin-yaml](https://www.npmjs.com/package/@rollup/plugin-y ## install ```bash -pnpm add -D @farmfe/plugin-yml +pnpm add -D @farmfe/plugin-yaml ``` ## Usage @@ -20,7 +20,7 @@ import { defineConfig } from '@farmfe/core'; export default defineConfig({ plugins: [ [ - '@farmfe/plugin-yml', + '@farmfe/plugin-yaml', { documentMode: 'single' | 'multi', // default single include: Regex, // default None, @@ -31,6 +31,6 @@ export default defineConfig({ }); ``` -notice: +*notice:* include or exclude is Regex not glob For example `**/01.yaml` is not illegal。What is right is like `".*\\/01.yaml"`