Configuration overview

All the Coffeekraken ecosystem is build on the same simple and efficient configuration principle.

The package that correspond to this system is @coffeekraken/s-sugar-config

This configuration system has as it's center principles these points:

Different level of configuration:

  • default: Configuration defined by default
  • module: Configuration defined by "node_modules" modules
  • repo: Configuration defined at the root of your repo (essentially for monorepos)
  • package: Configuration defined at the root of your current package
  • user: Configuration defined for the user only

Each level override the one above itself

  • The package level override the ones above like repo, module and default
  • The user level override the package level, etc...
  • I think you got the point...

Each configurations are simple js files:

  • Depending on the level, the storage path is different:
    • default: src/config/*.config.js
    • module: node_modules/*/src/config/*.config.js
    • repo/package: .sugar/*.config.js
    • user: .local/.sugar/*.config.js
  • Each file is a simple .js file that export a configuration object

The configurations are accessible through the @coffeekraken/s-sugar-config package

Simple package structure sample

Here's a simple package structure that integrate the configurations files.

  • Some packages defines the somePackage.config.js
    • node_modules
  • User only override.
    • .local/.sugar/somePackage.config.js
  • Package level override
    • .sugar/somePackage.config.js

Access your configurations

To access your configuration, simply install the @coffeekraken/s-sugar-config package like so:

Then, here's an example to access the "storage" configurations. (more on built-in configurations on the @coffeekraken/s-sugar-config package page)

Bugs
are not our friends...

Don't hesitate to declare an issue if something does not works as expected.

Declare my issue on Github Talk about it on Discord

The more we are,
the stronger we become.

Don't hesitate to tell some words to you friends about us. The goal is to became more and more each days to help each others...

Support us on Patreon! Share on Facebook! Make a tweet!

The more we are,
the stronger we become.

Don't be afraid to join us on Discord.

Join us on discord!

We love,
Open source!

All of our codebase can be found on Github. We hope that you may contribute to help us make our tools even better!

Discover our codebase!

Welcome on