Socket
Socket
Sign inDemoInstall

roc-config

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roc-config

Configuration manager for the Roc ecosystem


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

roc-config

Configuration manager for the Roc ecosystem.

Notes

Important to note that this project will look for two environment variables; ROC_CONFIG and ROC_CONFIG_OBJECT.
If either of them are found they will be used instead of what has been set during runtime. Please read the documentation to understand how this works in more detail.

If there is a conflict where both an environment variable is set and something overriden manually, there will a a clear warning given to the user.

Once imported to your project the configuration and all its internal states will persist throughout the process lifetime.

Documentation

To generate documentation please run npm run docs.

Application Configuration Format

For roc-config to understand a roc.config.js file in a project this needs to export an object with a config key.

Examples

Use configuration:

import { getFinalConfig } from 'roc-config';

const config = getFinalConfig();

Extend configuration with custom configuration and use it:

import { getFinalConfig } from 'roc-config';

const customConfig = {
    property: 'value'
};

const config = getFinalConfig(customConfig);

Perform multiple modifications and use:

import { getFinalConfig, appendConfig } from 'roc-config';

// deep merges parameter to current appended configuration state
appendConfig({
    value: 'value'
});

appendConfig({
    value2: 'value2'
});

// config will hold { "value": "value", "value2": "value2" }
const config = getFinalConfig();

Keywords

FAQs

Package last updated on 18 Nov 2015

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