viv normalize
Tidies composer.json's key order and formatting, a native composer
normalize (ergebnis/composer-normalize). This is the same pass add,
rm and init already apply automatically when they write, so reach for
it directly only when a manually-edited composer.json has drifted.
Usage
Normalize composer.json's key order and formatting, a native `composer normalize` (ergebnis/composer-normalize)
Usage: viv normalize [OPTIONS]
Options:
-d, --project-dir <PROJECT_DIR> Project directory holding `composer.json` [default: .]
-v, --verbose Raise logging to debug
--cache-dir <CACHE_DIR> Store location (default `$XDG_CACHE_HOME/vivace`, or `~/.cache/vivace`)
--check Check whether `composer.json` is normalized without writing; exits 1 and prints a diff if it is not
--indent-size <INDENT_SIZE> Spaces per indent level. Defaults to the file's own indent (`detect_indent`), same as Composer's `JsonManipulator` and `ergebnis/composer-normalize`
--offline Fail fast on any request instead of connecting: install errors, naming every package not already in the store; update solves from cached repository metadata only, erroring on an uncached package. Also set by `COMPOSER_DISABLE_NETWORK` (any value but unset, empty or `0`; Composer's own git-priming `prime` value is not special-cased here, since neither `install` nor `update` touch a git source)
-h, --help Print help
Reads and writes
- Reads:
composer.json. - Writes:
composer.json(unless--dry-run/--diff).
Exit codes
0— already normalized, or normalized successfully.1— a filesystem error, invalid JSON, or a bad flag; also--checkfinding the file not normalized.