Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@modyfi/vite-plugin-yaml
Advanced tools
Transforms a YAML file into a JS object.
npm install -D @modyfi/vite-plugin-yaml
# or
# yarn add -D @modyfi/vite-plugin-yaml
# or
# pnpm i -D @modyfi/vite-plugin-yaml
Add ViteYAML
to vite.config.js / vite.config.ts
:
// vite.config.js / vite.config.ts
import ViteYaml from '@modyfi/vite-plugin-yaml';
export default {
plugins: [
ViteYaml(), // you may configure the plugin by passing in an object with the options listed below
],
};
The recommended way to add type definitions for .yaml
or .yml
modules is via a tsconfig.json
file.
// tsconfig.json
{
"compilerOptions": {
...
"types": [
...
"@modyfi/vite-plugin-yaml/modules"
],
}
}
You may also add type definitions without tsconfig
:
// vite-env.d.ts
/// <reference types="@modyfi/vite-plugin-yaml/modules" />
/**
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.
*
* By default all files are targeted.
*/
include?: FilterPattern;
/**
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore.
*
* By default no files are ignored.
*/
exclude?: FilterPattern;
/**
* Schema used to parse yaml files.
*
* @see https://github.com/nodeca/js-yaml/blob/49baadd52af887d2991e2c39a6639baa56d6c71b/README.md#load-string---options-
*/
schema?: Schema;
/**
* A function that will be called for error reporting.
*
* Defaults to `console.warn()`.
*/
onWarning?: (warning: YAMLException) => void;
FAQs
Import YAML files as JS objects 🔌
The npm package @modyfi/vite-plugin-yaml receives a total of 45,987 weekly downloads. As such, @modyfi/vite-plugin-yaml popularity was classified as popular.
We found that @modyfi/vite-plugin-yaml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.