Socket
Book a DemoInstallSign in
Socket

@jackdbd/eleventy-plugin-ensure-env-vars

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jackdbd/eleventy-plugin-ensure-env-vars

Eleventy plugin that checks environment variables before Eleventy builds your site.

1.2.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@jackdbd/eleventy-plugin-ensure-env-vars

npm version install size CodeCov badge Socket Badge

Eleventy plugin that checks environment variables before Eleventy builds your site.

Installation

npm install @jackdbd/eleventy-plugin-ensure-env-vars

Note: this library was tested on Node.js >=18. It might work on other Node.js versions though.

Usage

In your Eleventy config file:

import { ensureEnvVarsPlugin } from '@jackdbd/eleventy-plugin-ensure-env-vars'

export default function (eleventyConfig) {
  // some eleventy configuration...

  eleventyConfig.addPlugin(ensureEnvVarsPlugin, {
    envVars: ['DEBUG', 'NODE_ENV']
  })

  // some more eleventy configuration...
}

Configuration

Plugin options

KeyDefaultDescription
envVarsundefinedEnvironment variables you want to be set when building your Eleventy site

Troubleshooting

This plugin uses the debug library for logging. You can control what's logged using the DEBUG environment variable.

For example, if you set your environment variables in a .envrc file, you can do:

# print all logging statements
export DEBUG=11ty-plugin:*

Dependencies

PackageVersion
zod^3.23.0
zod-validation-error^3.1.0

⚠️ Peer Dependencies

This package defines 2 peer dependencies.

PeerVersion range
@11ty/eleventy>=2.0.0 or 3.0.0-alpha.6
debug>=4.0.0

License

© 2022 - 2024 Giacomo Debidda // MIT License

Keywords

11ty

FAQs

Package last updated on 29 Apr 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.