@modyfi/vite-plugin-yaml
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -33,4 +33,7 @@ import { Schema, YAMLException } from 'js-yaml'; | ||
}; | ||
/** | ||
* Transform YAML files to JS objects. | ||
*/ | ||
declare const _default: (options?: PluginOptions) => Plugin; | ||
export { PluginOptions, _default as default }; |
@@ -5,3 +5,3 @@ // src/index.ts | ||
import toSource from "tosource"; | ||
var yamlExtension = /\.yaml$/; | ||
var yamlExtension = /\.ya?ml$/; | ||
var src_default = (options = { schema: DEFAULT_SCHEMA }) => ({ | ||
@@ -8,0 +8,0 @@ name: "vite:transform-yaml", |
{ | ||
"name": "@modyfi/vite-plugin-yaml", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Import YAML files as JS objects 🔌", | ||
@@ -45,27 +45,23 @@ "type": "module", | ||
"peerDependencies": { | ||
"vite": "^2.6.0" | ||
"vite": "^2.6.0 || ^3.0.0" | ||
}, | ||
"dependencies": { | ||
"@rollup/pluginutils": "^4.1.2", | ||
"js-yaml": "^4.1.0", | ||
"tosource": "^2.0.0-alpha.3" | ||
"@rollup/pluginutils": "4.2.1", | ||
"js-yaml": "4.1.0", | ||
"tosource": "2.0.0-alpha.3" | ||
}, | ||
"devDependencies": { | ||
"@types/js-yaml": "^4.0.5", | ||
"c8": "^7.11.0", | ||
"tsup": "^5.11.13", | ||
"typescript": "^4.5.5", | ||
"vite": "2.7.10", | ||
"vitest": "^0.5.5" | ||
"@types/js-yaml": "4.0.5", | ||
"c8": "7.12.0", | ||
"tsup": "5.12.8", | ||
"typescript": "4.7.4", | ||
"vite": "3.0.4" | ||
}, | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"dev": "tsup --watch src", | ||
"example:dev": "pnpm -C example run dev", | ||
"example:build": "pnpm run build && npm -C example run build", | ||
"build": "tsup", | ||
"test": "vitest", | ||
"test:watch": "vitest -w", | ||
"coverage": "vitest run --coverage" | ||
}, | ||
"readme": "# 🧹 vite-plugin-yaml\n\nTransforms a YAML file into a JS object.\n\n## 🚀 Install\n\n```\nnpm install -D @modyfi/vite-plugin-yaml\n# or\n# yarn add -D @modyfi/vite-plugin-yaml\n# or\n# pnpm i -D @modyfi/vite-plugin-yaml\n```\n\n## 🦄 Usage\n\nAdd `ViteYAML` to `vite.config.js / vite.config.ts`:\n\n```ts\n// vite.config.js / vite.config.ts\nimport ViteYaml from '@modyfi/vite-plugin-yaml';\n\nexport default {\n plugins: [\n ViteYaml(), // you may configure the plugin by passing in an object with the options listed below\n ],\n};\n```\n\n### 🔦 TypeScript support\n\nThe recommended way to add type definitions for `.yaml` or `.yml` modules is via a `tsconfig.json` file.\n\n```json\n// tsconfig.json\n{\n \"compilerOptions\": {\n ...\n \"types\": [\n ...\n \"@modyfi/vite-plugin-yaml/modules\"\n ],\n }\n}\n```\n\nYou may also add type definitions without `tsconfig`:\n\n```ts\n// vite-env.d.ts\n/// <reference types=\"@modyfi/vite-plugin-yaml/modules\" />\n```\n\n## 🐛 Options\n\n```ts\n/**\n * A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.\n *\n * By default all files are targeted.\n */\ninclude?: FilterPattern;\n/**\n * A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore.\n *\n * By default no files are ignored.\n */\nexclude?: FilterPattern;\n/**\n * Schema used to parse yaml files.\n *\n * @see https://github.com/nodeca/js-yaml/blob/49baadd52af887d2991e2c39a6639baa56d6c71b/README.md#load-string---options-\n */\nschema?: Schema;\n/**\n * A function that will be called for error reporting.\n *\n * Defaults to `console.warn()`.\n */\nonWarning?: (warning: YAMLException) => void;\n```\n" | ||
"example:build": "pnpm run build && pnpm -C example run build", | ||
"build": "tsup" | ||
} | ||
} |
@@ -0,1 +1,3 @@ | ||
[![Pipeline](https://github.com/Modyfi/vite-plugin-yaml/actions/workflows/pipeline.yml/badge.svg)](https://github.com/Modyfi/vite-plugin-yaml/actions/workflows/pipeline.yml) | ||
# 🧹 vite-plugin-yaml | ||
@@ -34,3 +36,3 @@ | ||
```json | ||
```ts | ||
// tsconfig.json | ||
@@ -37,0 +39,0 @@ { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5
99
84
6751
1
+ Added@esbuild/android-arm@0.15.18(transitive)
+ Added@esbuild/linux-loong64@0.15.18(transitive)
+ Addedesbuild@0.15.18(transitive)
+ Addedesbuild-android-64@0.15.18(transitive)
+ Addedesbuild-android-arm64@0.15.18(transitive)
+ Addedesbuild-darwin-64@0.15.18(transitive)
+ Addedesbuild-darwin-arm64@0.15.18(transitive)
+ Addedesbuild-freebsd-64@0.15.18(transitive)
+ Addedesbuild-freebsd-arm64@0.15.18(transitive)
+ Addedesbuild-linux-32@0.15.18(transitive)
+ Addedesbuild-linux-64@0.15.18(transitive)
+ Addedesbuild-linux-arm@0.15.18(transitive)
+ Addedesbuild-linux-arm64@0.15.18(transitive)
+ Addedesbuild-linux-mips64le@0.15.18(transitive)
+ Addedesbuild-linux-ppc64le@0.15.18(transitive)
+ Addedesbuild-linux-riscv64@0.15.18(transitive)
+ Addedesbuild-linux-s390x@0.15.18(transitive)
+ Addedesbuild-netbsd-64@0.15.18(transitive)
+ Addedesbuild-openbsd-64@0.15.18(transitive)
+ Addedesbuild-sunos-64@0.15.18(transitive)
+ Addedesbuild-windows-32@0.15.18(transitive)
+ Addedesbuild-windows-64@0.15.18(transitive)
+ Addedesbuild-windows-arm64@0.15.18(transitive)
+ Addedrollup@2.79.2(transitive)
+ Addedvite@3.2.11(transitive)
- Removed@esbuild/linux-loong64@0.14.54(transitive)
- Removedesbuild@0.14.54(transitive)
- Removedesbuild-android-64@0.14.54(transitive)
- Removedesbuild-android-arm64@0.14.54(transitive)
- Removedesbuild-darwin-64@0.14.54(transitive)
- Removedesbuild-darwin-arm64@0.14.54(transitive)
- Removedesbuild-freebsd-64@0.14.54(transitive)
- Removedesbuild-freebsd-arm64@0.14.54(transitive)
- Removedesbuild-linux-32@0.14.54(transitive)
- Removedesbuild-linux-64@0.14.54(transitive)
- Removedesbuild-linux-arm@0.14.54(transitive)
- Removedesbuild-linux-arm64@0.14.54(transitive)
- Removedesbuild-linux-mips64le@0.14.54(transitive)
- Removedesbuild-linux-ppc64le@0.14.54(transitive)
- Removedesbuild-linux-riscv64@0.14.54(transitive)
- Removedesbuild-linux-s390x@0.14.54(transitive)
- Removedesbuild-netbsd-64@0.14.54(transitive)
- Removedesbuild-openbsd-64@0.14.54(transitive)
- Removedesbuild-sunos-64@0.14.54(transitive)
- Removedesbuild-windows-32@0.14.54(transitive)
- Removedesbuild-windows-64@0.14.54(transitive)
- Removedesbuild-windows-arm64@0.14.54(transitive)
- Removedrollup@2.77.3(transitive)
- Removedvite@2.9.18(transitive)
Updated@rollup/pluginutils@4.2.1
Updatedjs-yaml@4.1.0
Updatedtosource@2.0.0-alpha.3