Currently, there is no mechanism in the Angular tooling to forcefully
output colors regardless of detected terminal capabilities. This commit
adds an override via an environment variable: `FORCE_COLOR`. The
behavior in this commit is the same as the behavior in a commonly used
module, `supports-color` (https://github.com/chalk/supports-color#info).
This is especially useful when piping output from the Angular CLI, which
would automatically and irreversibly disable colors before this commit.
Supports for new lines and hexa was useful for doc and descriptions (including
schematics and builder declarations). Adding the other numerical constants was
easy enough. This fully completes JSON5 support.
This should clean up the code a bit.
Note: at first I added the no-useless-cast rule, but after getting frustrated
with it (as it has many false positive), I decided to remove the rule but some
useless casts were removed so I let those in the PR.
With fixes; new now handles the parent initialize, visitor_spec now errors on
rejection, and nothing in the writeI18nOutFile() function was async so removed
the promise there entirely.
The comparator function for project names was invalid; sort() expect to be consistent and
in this case was returning 1 for a set of arguments, and 0 if arguments were reversed, leading
inconsistencies in the sort result.