The process of building a project can be very much more complicated than you can imagine. Look at the following graph:
This could exist in reality.
Grunt's tasks require reading/writing files, which bring tedious directory-making/removing and heavy disk IO. And it's difficult to tell a specific executing process from gruntfile.js.
Gulp is much better, file contents are transmited in Stream from plugin to plugin. Chained process definition is much more intelligible, but:
That means index.js will be read twice:
gulp.src('*.js')
gulp.src('index.js')
This should be optimized.
Developers always use gulp-watch to execute an increment building.
watch('**/*.js', function() {
gulp.src('**/*.js')
});
All js files will be rebuild.
gulp.src() can only select known file types. Apparently, you will not use gulp.src('*').
We will see.
Panto
is trying to fixed these issues, in the following ways:
1. Process described by directed acyclic graph
This is the exact way to describe a building process, with universality.
If file content is not changed, result will not change either.
Will not read a file more than once.
Minimum incremental building.