From 0ac9e043a4d6947ff2ae4496657ae44b21b5a958 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Fri, 18 Nov 2016 21:26:26 +0000 Subject: [PATCH] Docs: Add "Project structure" section to CONTRIBUTING.md (#1859) --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d8f4d5c3..15e8baa31 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,6 +28,53 @@ of the content - formatting: help keep content easy to read with consistent formatting - code: Fix issues or contribute new features to this or any related projects +# Project structure + +Gulp itself is tiny: index.js contains [very few lines of code](https://github.com/gulpjs/gulp/blob/4.0/index.js). +It is powered by a few other libraries which each handle a few specific tasks +each. + +You can view all issues with the "help wanted" label across all gulp projects +here: https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Agulpjs+label%3A%22help+wanted%22+ + +## Undertaker: task management + +Undertaker handles task management in Gulp: the `gulp.task()`, `gulp.series()` +and `gulp.parallel()` functions. `gulp.series()` and `gulp.parallel()` are in +turn powered by Bach. + +- https://github.com/gulpjs/undertaker +- https://github.com/gulpjs/bach + +## vinyl-fs: file streams + +vinyl-fs powers the `gulp.src()` and `gulp.dest()` functions: they take files +and globs specified by the user, turns them into a stream of file objects, +and then puts them back into the filesystem when `gulp.dest()` is called. + +The file objects themselves are vinyl objects: that's another library (a simple +one!) + +- https://github.com/gulpjs/vinyl-fs +- https://github.com/gulpjs/vinyl + +## chokidar: file watching + +`gulp.watch()` is using chokidar for file watching. It's actually wrapped in a +small library on the gulp organization, glob-watcher. + +- https://github.com/paulmillr/chokidar +- https://github.com/gulpjs/glob-watcher + +## gulp-cli: running gulp + +Finally, we have gulp-cli. This uses liftoff to take what people run in the +command line and run the correct tasks. It works with both gulp 4 and older +versions of gulp. + +- https://github.com/gulpjs/gulp-cli +- https://github.com/js-cli/js-liftoff + # Conduct We are committed to providing a friendly, safe and welcoming environment for