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

@venncity/nested-config

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@venncity/nested-config

![Coverage](https://api.venn.city/production/coverage/badge?branch=master&repository=@venncity/nested-config)

  • 3.1.27
  • npm
  • Socket score

Version published
Weekly downloads
418
decreased by-8.33%
Maintainers
1
Weekly downloads
 
Created
Source

Coverage

Nested config

Extends the node config module to combine parent and nested packages config

Node config does not support getting configuration defined inside a npm package. It always takes the config from the config files under the working directory so configuration of packages are ignored.

This package merges the configuration defined inside npm packages into the parent config and so you can get the configuration defined inside packages seamlessly.

Usage:

Everywhere you use config in an npm package, require it like so:

const config = require('@venncity/nested-config')({ modulePath: __dirname})

NestedConfig Webpack Build Rule:

This package also includes nestedConfigBuildRule which executes similar logic to what the package does in runtime, except it runs it at build time. Then it injects the prebuiltConfigJson as a "hardcoded" parameter of bested-config:

const config = require('@venncity/nested-config')({ prebuiltConfigJson: "\{ key1: value1, key2: value2, ...\}"})

When called using the prebuiltConfigJson param, nested config does not rely on runtime filesystem structures and thus can be executed from a webpack bundle.

FAQs

Package last updated on 18 Oct 2022

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