Socket
Socket
Sign inDemoInstall

@stencila/configa

Package Overview
Dependencies
84
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @stencila/configa

Application configuration: DRY, flexible and type-safe


Version published
Weekly downloads
30
increased by25%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

0.2.0 (2019-12-02)

Bug Fixes

  • Config: Fix bug involved in finding config file (8993ff7)
  • Dependencies: Pin; update Logga (b2bcac7)
  • Package: Add bin entry to package.json (bbf2193)
  • Validators: Emit pattern value properly (1eb3756)

Features

  • CLI Help: Improve generation of CLI usage (99df7fe)
  • Config: Search for config file by default (32a793d)
  • Run time: Validate against schema when collecting options (1eb772a)
  • Types: Improve handling of union types and their validation (8f4583f)

Readme

Source

Configa

Application configuration: DRY, flexible and type-safe. Pick any three.

Build status Code coverage NPM

:warning: Configa is in early development. It's been factored out of Sparkla, another project in early development, for more general usage.

Install

npm install --save @stencila/configa

Usage

All configuration options can be set, in descending order of priority, by:

  • a command line argument e.g. --<value> <value>
  • an environment variable prefixed with CONFIGA_ e.g. CONFIGA_<option>=<value>
  • a .json or .ini configuration file, set using the --config option, or .configarc by default
NameDescriptionTypeValidatorsDefault
appNameThe name of the application.1stringundefined
configPathPath to the configuration file to be parsed.2stringundefined
jsonSchemaPathPath to the JSON Schema file to be generated.3stringundefined
readmePathPath to the README file to be updated.string"README.md"
  1. Determines the expected prefix on the names of config files and environment variables. If undefined then parse the name from the package name in ./package.json.
  2. If undefined, then will search for a file config.ts in the current directory and its subdirectories.
  3. If undefined, then will be the path of the config file with extension .json.schema instead of .ts.

Keywords

FAQs

Last updated on 02 Dec 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc