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

@boost/config

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boost/config

Powerful convention based finder, loader, and manager of both configuration and ignore files.

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Configuration - Boost

build status npm version

Powerful convention based finder, loader, and manager of both configuration and ignore files.

import { Blueprint, Schemas } from '@boost/common';
import { Configuration } from '@boost/config';

interface ConfigFile {
  debug: boolean;
  sourceMaps: boolean;
}

class ConfigManager extends Configuration<ConfigFile> {
  blueprint({ bool }: Schemas): Blueprint<ConfigFile> {
    return {
      debug: bool(),
      sourceMaps: bool(),
    };
  }
}

const configManager = new ConfigManager('boost');

// Load `.config/boost.js`, `boost.production.json`, `.boost.yaml`, etc
const { config } = await configManager.loadConfigFromRoot('.');

// Load `.boostignore` files
const ignore = await configManager.loadIgnoreFromBranchToRoot('./some/deep/path');

Features

  • Loads root configs (.config/<name>.js) and branch configs (.<name>.js).
  • Loads ignore files (.<name>ignore).
  • Supports multiple config types: js, cjs, mjs, json, yaml
  • Supports environment and root-level based overrides.
  • Supports extending from other config files.
  • Finds files within each branch folder while traversing up the tree.
  • Caches finder results for increased efficiency.
  • Custom key-value setting processors.

Installation

yarn add @boost/config

Documentation

  • https://boostlib.dev/docs/config
  • https://boostlib.dev/api/config

Keywords

FAQs

Package last updated on 01 Mar 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