Open Marak opened 8 years ago
Good idea. I want to test this against a logging stream to make sure the custom display is used over toJSON
@Marak Still interested in this?
I'd like it to support this ideally: new File(otherFile.toJSON())
- might be overkill though to include history and other fields that might not be pretty to look at in a log.
Should we lose history here? Just stat/path/contents? LMK
@contra we can't actually do this due to streaming contents. It's the main reason I opened #133, which will be revisited in the next major (after gulp 4).
I can't remember the specifics, but it seemed to be having been working fine for my use-case.
I needed to serialize the object in order to inspect its properties, not inspect it's binary contents or stream data.
Hello.
Was wondering if there is any support for turning a vinyl
File
into a JSON object? I couldn't seem to find anything.Obviously I can write a simple serialization method, but I was wondering if it exists anywhere else in the tool-chain. If not, would you want to add
File.toJSON
to core?