Composer Normalize is a plugin for Composer that normalizes the composer.json file in your projects.
This package exists to take the pain out of formatting and organizing the composer.json file, doing things such as:
- Restructure composer.json according to the underlying JSON schema
- Sort entries in the
bin
configuration option - Sort entries in the
config
,extra
, andscripts-descriptions
(by key) - Sort entries in the
conflict
,provide
,replace
,require
,require-dev
, andsuggest
sections - Normalize version constraints in
conflict
,provide
,replace
,require
, andrequire-dev
sections
To use this project, you can install it globally, as a composer development dependency or as a PHAR archive. Once you install the package, you have various options to use to normalize the file as you'd like:
1# Defaults 2composer normalize 3 4# Indent settings 5composer normalize --indent-size=2 --indent-style=space 6 7# Dry run without making changes 8composer normalize --dry-run 9 10# Run normalization and output the diff11composer normalize --diff
You can learn more about this package, get full installation instructions, and view the source code on GitHub.
0 comments:
Post a Comment
Thanks