Giter Site home page Giter Site logo

benedyktdryl / config Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 140 KB

JavaScript application configuration: moder, customisable & extensible

TypeScript 73.95% JavaScript 26.05%
configuration configuration-management node-config configuration-by-environment configuration-parser configuration-loader config-management

config's People

Contributors

bdryl-softserve avatar benedyktdryl avatar

Watchers

 avatar  avatar

config's Issues

Babel providers are not resolving modules correctly

Using any of modules imports inside config file which is parsed by Babel leads to "module not found error" due to different path of parsed file and path of provider.

Fix it by setting cwd or using custom module resolver.

Allow postprocessing hooks

Postprocessing hooks should be allowed to be injected along with handlers and providers. Implement basic use cases:

  • JOI based validation
  • filling with defaults (can be done with JOI but check if it can be done separately)
  • replacing %parameter% with passed parameter (Symfony style)

Implement deferred values

Deferred values should be implemented as provider (ProviderDeferred).

Example of usage:

const provider = new ProviderDeferred({
  'path.to.nested.property': config => composedValue
});

This way, we are not polluting configs with deferred methods and also, we can use deferred values even when using non executable formats like JSON or YAML.

Fix inconsistency in environment variables provider

Right now, config for ProviderEnvVariables looks like this:

{
  "ENV_VARIABLE_NAME": "path.to.nested.property"
}

To be consistent with #2 ProviderDeferredValues, it should be implemented like this:

{
  "path.to.nested.property": "ENV_VARIABLE_NAME"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.