Load configuration from multiple sources, with support for predefined environments.
This is a monorepo. See the individual packages for usage information and documentation:
- ganzu for the main package
- ganzu-json for JSON configuration
- ganzu-yaml for YAML configuration
# Install dependencies
$ npm install
# Run all checks
$ npm run dev
There are a few scripts defined in package.json
that operate on all packages:
npm run build
- Bundle and transpile to JSnpm run test
- Run testsnpm run lint
- Run ESLintnpm run lint:fix
- Run ESLint and fix any auto-fixable issuesnpm run format
- Run Prettier and fix any auto-fixable issuesnpm run format:check
- Run Prettier, but don't change any files
Additionally, there is a combination of all of these: npm run dev
, which could be used as the basis of a pre-commit hook.
For more fine-grained tasks, you can change into the individual package you're working on, or use turbo to filter tasks. For example:
# Run tests in the ganzu package
$ npx turbo run test --filter=ganzu
# Run lint in the json package
$ npx turbo run lint --filter=@ganzu/json
Using turbo this way will also run any dependencies of the package, such as building the ganzu when testing ganzu-json.
Ganzu is inspired by django-configurations and zod-config.
The word "ganzu" is a Lojban word whose full English definition is:
x1
organizesx2
[relative chaos] intox3
[ordered/organized result] by system/principle(s)x4
Depending on how it is used, this can be used to refer to the organizer, the thing being organized, the result, or the system of organization. The simplest translation is something like "organizer" or "to organize".