플러그인 작성하기
September 11, 2015 · View on GitHub
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
What it does
### 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.
Modifying file content
Vinyl files can have 3 possible forms for the contents attribute:
Useful resources
Sample plugins
About streams
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.