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

esbuild-plugin-yaml

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-yaml

Convert YAML files to ES6 modules

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.3K
decreased by-10.85%
Maintainers
1
Weekly downloads
 
Created
Source

esbuild-plugin-yaml

Use YAML files as ES6 modules with esbuild.

Install

yarn add -D esbuild-plugin-yaml

or

npm i -D esbuild-plugin-yaml

Usage

Add to your esbuild plugins list:

const esbuild = require("esbuild");
const { yamlPlugin } = require("esbuild-plugin-yaml");

esbuild.build({
  ...
  plugins: [
    yamlPlugin()
  ]
  ...
});

Options

You can add your own custom configuration of options to esbuild-plugin-yaml:

yamlPlugin({
  // options
});

loadOptions

LoadOptions by js-yaml.

transform

A function which can mutate parsed YAML. It should return an object or undefined (that will make no changes to the parsed YAML).

  transform(data, filePath) {
    // transform the yaml file
    // the file content will be in the "data" field
    // the file path will be in the "filePath" field
    return { filePath, data };
  }

FAQs

Package last updated on 20 Feb 2021

Did you know?

Socket

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.

Install

Related posts

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