Open dominicbarnes opened 11 years ago
I was already asking for some task output guidelines on #grunt several times. I definitely support this, as each task right now has a different style, and the output looks really chaotic.
If nothing else, grunt should define a colors.js theme:
var colors = require('colors');
colors.setTheme({
input: ...,
verbose: ...,
prompt: ...,
info: ...,
data: ...,
help: ...,
warn: ...,
debug: ...,
error: ...
});
and enforce it's usage among tasks. This theme could be than configurable in initConfig with 2 presets for light/dark console backgrounds.
Also having rules like 'do not output anything in non --verbose mode', etc ... (depending on what would be the consensus) would be awesome.
Basically a docs page with task output style and formatting guidelines.
+1
Definitely!
I have a proposal for
grunt
and the family ofgrunt-contrib-*
plugins. (and even beyond to 3rd-party plugins) When running tasks, there's no agreed-upon standard for outputting log data. For example, destination/output files are output in cyan by theless
task whileconcat
simply wraps the value in quotes andcompass
does nothing. It would be great if at least the official plugins could agree upon a "style guide" for outputting specific bits of data in their output.In addition, this "style guide" can either be published in documentation for plugin developers to optionally include in their tasks, or perhaps an API of sorts could be exposed as methods on
grunt.log
and friends.Some examples of what I mean exactly:
less
)compress
) in greenDoes anyone else have any thoughts on something like this? I think this could definitely improve the readability of grunt-powered build processes (especially fairly complex/large ones that I currently maintain) and could very well be "low-hanging fruit".