Collection of CLI commands that make my life easier, such as maintaining configuration files across different projects. It might help you too!
Reads wes-config.json
file in the current directory and installs files related
to all dependencies. All files are added to the .gitignore
file because they
are generated and copied from the package itself.
All configurations are merged with each other, allowing multiple packages to change the same configuration depending on their need. The current logic is extremely simplistic (plain text files are appended, JSON files are deeply merged, yarn.lock files are regenerated). Files which can't be merged can be used, but only one version should exist, as another will generate a conflict.
Local overrides to configured files should be added to .wes-defaults/local
,
which will be merged last to take precedence for potential overrides.
This project is built using itself, so you can peek at wes-config.json and .wes-defaults/local to get a sense of usage.
You can see a list of dependencies as folders on modules.
Supported properties:
- All versions:
version: number
: Configuration version (latest is2
)dependencies: string[]
: List of modules to import configurations files from. See modules for all supported dependencies.
- Version > 2:
localOverrides?: string[]
: List of file paths from.wes-defaults/local
that should be kept as is, not merging with any module's version. Paths shouldn't include a leading /.