Digital-Alchemy-TS / Digital-Alchemy-TS/core

Add flag to generate a "defaults" configuration file

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
enhancement feat: configuration
Dominant language
TypeScript
Stars
53
Forks
1
Avg merge
1m
Merged PRs (30d)
1

Description

Add the ability to generate a "defaults" configuration file via `boilerplate.BUILD_DEFAULT_CONFIG`. This will build a valid configuration file with all configuration properties in it. The value for everything should be the module defined defaults, ignoring any others

Must display all help text, enums, type information, required state in the file

## Activate

- `--build-default-config` - output at **./.{appname}** in `ini` format
- `--build-default-config ./output` - output at the target file

```bash
# example usage
node dist/my_app.js --build-default-config ./default_config

# loading the file (already implemented)
node dist/my_app.js --config ./my_custom_config
```

## Notes

Only supporting `ini` & `yaml` / `yml` (none = `ini`) initial implementation. `JSON` files possible if [comment-json](https://www.npmjs.com/package/comment-json) gets added as a production dependency

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.