How gulpjs/gulp works
Gulp is a small streaming build toolkit: developers define tasks that read files, optionally transform streams with plugins, and write results; tasks can be composed in series or parallel and rerun when watched files change. The package itself is a thin façade over task scheduling, file streams, and glob watching, with CommonJS and ESM entry points plus a CLI launcher. The README documents the broader task workflow; sampled source shows the façade’s dependencies, but not their internal implementations.
Main entry points: index.js Gulp Instance · index.mjs ESM Exports · gulp.js CLI Launcher
Components 10
Public API
- Gulp Instance
index.js - ESM Exports
index.mjs - CLI Launcher
bin/gulp.js
Task Runtime
- Task Scheduler
File and Watch I/O
- File Streams
- Glob Watcher
Other components
- Task Author
- gulp-cli
- Transform Plugins
- Project Files
Connections 12
- Task Author → Gulp Instance: defines tasks
README.md - Gulp Instance → Task Scheduler: inherits task API
index.js - Gulp Instance → File Streams: delegates file streams
index.js - Gulp Instance → Glob Watcher: registers watches
index.js - ESM Exports → Gulp Instance: exports instance
index.mjs - CLI Launcher → gulp-cli: invokes CLI
bin/gulp.js - gulp-cli → Gulp Instance: loads task interface
- Project Files → File Streams: provides source files
- File Streams → Transform Plugins: streams through
README.md - Transform Plugins → File Streams: transforms streams
README.md - File Streams → Project Files: writes destinations
README.md - Glob Watcher → Task Scheduler: triggers tasks
README.md