New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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
  • npm
  • Socket score

Version published
Weekly downloads
41
increased by24.24%
Maintainers
1
Weekly downloads
 
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

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

  • 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