Summarize output by default (transactions available via --verbose) #62

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants
Contributor

ericclemmons commented Mar 26, 2013

I had a version of this already going in grunt-verbosity, so I went ahead & moved it over here.

It will spit out something like Created N directories, copied M files. Passing --verbose will spit out the usual output alongside the rest of the noise :)

I hope you don't mind, @geddski.

/cc @doowb, @jonschlinkert, @tkellen.


Before

 ~ ⮁ Sites ⮁ ericclemmons ⮁ grunt-contrib-copy ⮀ master ⮀ $ ⮀grunt test
Running "clean:test" (clean) task
Cleaning "tmp"...OK

Running "copy:main" (copy) task
Copying test/fixtures/test.js -> tmp/copy_test_files/test.js
Copying test/fixtures/test2.js -> tmp/copy_test_files/test2.js
Creating tmp/copy_test_mix/
Creating tmp/copy_test_mix/empty_folder
Creating tmp/copy_test_mix/folder_one
Copying test/fixtures/folder_one/one.js -> tmp/copy_test_mix/folder_one/one.js
Creating tmp/copy_test_mix/folder_two
Copying test/fixtures/folder_two/two.js -> tmp/copy_test_mix/folder_two/two.js
Copying test/fixtures/test.js -> tmp/copy_test_mix/test.js
Copying test/fixtures/test2.js -> tmp/copy_test_mix/test2.js
Copying test/fixtures/folder_one/one.js -> tmp/copy_test_v0.1.0/folder_one/one.js

Running "copy:flatten" (copy) task
Copying test/fixtures/folder_one/one.js -> tmp/copy_test_flatten/one.js
Copying test/fixtures/folder_two/two.js -> tmp/copy_test_flatten/two.js
Copying test/fixtures/test.js -> tmp/copy_test_flatten/test.js
Copying test/fixtures/test2.js -> tmp/copy_test_flatten/test2.js

Running "copy:single" (copy) task
Copying test/fixtures/test.js -> tmp/single.js

Running "nodeunit:tests" (nodeunit) task
Testing copy_test.js...OK
>> 5 assertions passed (5ms)

Done, without errors.

Yuck!

After

 ~ ⮁ Sites ⮁ ericclemmons ⮁ grunt-contrib-copy ⮀ 57-summary ⮀ $ ⮀grunt test
Running "clean:test" (clean) task
Cleaning "tmp"...OK

Running "copy:main" (copy) task
Created 4 directories, copied 7 files

Running "copy:flatten" (copy) task
Copied 4 files

Running "copy:single" (copy) task
Copied 1 files

Running "copy:verbose" (copy) task
Created 4 directories, copied 4 files

Running "nodeunit:tests" (nodeunit) task
Testing copy_test.js...OK
>> 5 assertions passed (4ms)

Done, without errors.

Yum!


Refs #44 & #57

Owner

jonschlinkert commented Mar 26, 2013

👍 output looks great

Member

geddski commented Mar 26, 2013

Don't mind a bit, nicely done.

Member

geddski commented Mar 26, 2013

@tkellen LGTM, certainly cleans up the Angular build output.

@geddski geddski referenced this pull request Mar 26, 2013

Closed

add summary option #57

Owner

tkellen commented Mar 26, 2013

Other than missing documentation (needs to be added to docs/copy-options.md) and squashing the commits, this looks great. I'd be happy to merge today if we can get those things handled.

Contributor

ericclemmons commented Mar 26, 2013

@tkellen I'm confused on the part about copy-options. Did you intend for there to be a verbose Option within the Gruntfile? As it stands now, it pivots off of the --verbose flag from the CLI: grunt copy vs. grunt copy --verbose

Do you want all 3 (potentially 4 with the copy-options discussion) commits squashed, or just the first two? (It doesn't make sense to me to squash the version bump) Either way, whatever ya want!

Owner

tkellen commented Mar 26, 2013

@ericclemmons Whoops, I didn't notice the final commit. Could you drop that one please? Our READMEs are generated dynamically--that annotation needs to be entered as valid yaml in our CHANGELOG.

Sorry if I was unclear about the documentation. No, I wasn't expecting a new option, but it seems prudent to mention somewhere that --verbose is needed for a full file listing, only because we're changing the default behavior. Maybe it makes more sense to add that in the overview doc.

@tkellen tkellen closed this in 7f21fd7 Mar 26, 2013

Owner

tkellen commented Mar 26, 2013

Nevermind. I'll wrap this up from here. Thanks @ericclemmons!

Contributor

ericclemmons commented Mar 26, 2013

Beat me to it :) Thanks for the help @tkellen, glad to give back!

KOGI commented Jul 22, 2013

+1 Thank you, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment