If you plan to create your own Gulp plugin, you will save time by reading the full documentation.
- Guidelines (a MUST read)
- Using buffers
- Dealing with streams
- Testing
- README conventions
### Streaming file objects
A gulp plugin always returns a stream in object mode that does the following:
- Takes in vinyl File objects
- Outputs vinyl File objects
These are known as transform streams (also sometimes called through streams). Transform streams are streams that are readable and writable which manipulate objects as they're being passed through.
Vinyl files can have 3 possible forms for the contents attribute:
If you're unfamiliar with streams, you will need to read up on them:
Other libraries that are not file manipulating through streams but are made for use with gulp are tagged with the gulpfriendly keyword on npm.