Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@modyfi/vite-plugin-yaml

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modyfi/vite-plugin-yaml - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/index.cjs

4

modules.d.ts
declare module '*.yaml' {
const value: string;
const value: Record<string, any>;
export default value;
}
declare module '*.yml' {
const value: string;
const value: Record<string, any>;
export default value;
}
{
"name": "@modyfi/vite-plugin-yaml",
"version": "1.0.1",
"version": "1.0.2",
"description": "Import YAML files as JS objects 🔌",

@@ -12,9 +12,5 @@ "type": "module",

"license": "MIT",
"scripts": {
"start": "tsup --watch src",
"build": "tsup"
},
"exports": {
".": {
"require": "./dist/index.js",
"require": "./dist/index.cjs",
"import": "./dist/index.js"

@@ -28,3 +24,3 @@ },

"module": "dist/index.js",
"types": "index.d.ts",
"types": "dist/index.d.ts",
"files": [

@@ -38,4 +34,14 @@ "dist",

"vite-plugin",
"yaml"
"yaml",
"yml",
"modyfi"
],
"repository": {
"type": "git",
"url": "https://github.com/Modyfi/vite-plugin-yaml"
},
"bugs": {
"url": "https://github.com/Modyfi/vite-plugin-yaml/issues"
},
"homepage": "https://github.com/Modyfi/vite-plugin-yaml/tree/main/#readme",
"peerDependencies": {

@@ -46,10 +52,23 @@ "vite": "^2.6.0"

"@rollup/pluginutils": "^4.1.2",
"js-yaml": "^4.1.0",
"tosource": "^2.0.0-alpha.3"
},
"devDependencies": {
"@types/js-yaml": "^4.0.5",
"js-yaml": "^4.1.0",
"rollup": "^2.68.0",
"tosource": "^2.0.0-alpha.3",
"c8": "^7.11.0",
"tsup": "^5.11.13",
"typescript": "^4.5.5",
"vite": "2.7.10"
}
}
"vite": "2.7.10",
"vitest": "^0.5.5"
},
"scripts": {
"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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc