Skip to content
/ unifig Public

Universal, typed and validated configuration manager.

License

Notifications You must be signed in to change notification settings

Matii96/unifig

Repository files navigation

Unifig

Universal, typed and validated configuration manager.

MIT Licensed NPM version Commitizen friendly codecov Build Status

Table of Contents

💡 Goal

Unifig aims to provides simple and abstract way of handling app's configuration. It allows to load configuration data from multiple sources without changing defined config template. Many templates can be defined to further organize the code eg. MainConfiguration and ModuleConfiguration.

Adapted configuration data is transformed into templates and validated via class-transformer and class-validator. Once initialized configurations can be reloaded without app restart.

Packages

Examples

Local Development

Project uses yarn workspaces in combination with lerna. To initialize the project run

yarn

Building Packages

As project uses typescript for the package to be seen as other packages dependency they need to be built first.

yarn build

Testing

yarn lint:staged  # linting staged files
yarn test         # running unit tests for packages changed since HEAD
yarn test:cov     # running unit tests for whole repo with coverage report
yarn test:e2e     # running e2e tests for packages changed since HEAD with packages dependent on them
yarn test:all     # combining test and test:e2e

Committing

The project follows Conventional Commits standard. To conveniently create commit message use commitizen by typing

yarn cz

Authors

Mateusz Fonfara

See also the full list of contributors.

License

This project is licensed under the MIT License - see the LICENSE file for details.