sindresorhus/gulp-debug

Show file contents

Closed this issue · 7 comments

Hi,
This plugin is really awesome and useful when setting up a gulp pileline. However, I'm working with an assignment when it would be great to see the contents of the generated files as well (title isn't enough).

Would it be possible to add a "content" option to show contents? Initially this option defaults to false but can be set to true when needed.

Ideally there would be a "contentEncoding" option as well which let's me control how the content are going to be shown on the output. This can accept any of the encodings accepted by buf.toString() like 'ascii' or 'base64' but I'm happy with just plain if it's too much work.

Why do you need this? How much of the content to you expect to be shown?

This plugin used to support that, but I removed it as I didn't see any good use for it.

Ideally there would be a "contentEncoding" option as well which let's me control how the content are going to be shown on the output.

That simple, as you can't really set it for all the files, as it could be both text and binary.

I need to see the contents for quicker debugging. The output is usually a couple of lines (svg or HTML) so it's not really too much.

WDYT @sindresorhus? I personally feel like it adds a bunch of noise and not that much value but optionally, maybe.

I agree. Don't see much worth in this.

@arthurvr @kevva probably not something you wanna see by default, but every once in a while it is needed so badly, so you have to literally write those files in order to just see the few lines you're looking for. A functionality like unix "head" or "tail" commands would be ideal, though it would be much appreciated to have the option to be able to see the whole file.

Yes, that's better.