|Description||Continuously concatenates files|
|Node Version||>= 0.4|
var watch = ;var concat = ;gulp;
This will continously concat files by your operating systems newLine. This differs from the standard
gulp-concat plugin in that it does not require previous streams to emit an
end to work. The typical use case for this plugin is after using
gulp-watch, which does not emit an
end. This prevents normal
gulp-concat from ever finishing. Using the above example with standard
gulp-concat, the concatenated file would never be created:
var watch = ;var concat = ; // <-- standard gulp-concatgulp;
gulp-continuous-concat gets around this by rebuilding the destination file on every incoming file. To avoid excessive rebuilding (for example, when first running the command on several files), it debounces the build step so it will only run after 100ms of not being called (the debouncing period is configurable via the
debounce option on the options hash).
Files will be concatenated in the order that they are supplied, and will maintain that order even if one of those files is later re-emitted from upstream. For example, to concat
./lib/file2.js in that order, the following code would create a task to do that:
var concat = ;gulp;
gulp-watch does not emit files that were deleted, if you add a continuous concat step after a
gulp-watch, and then delete a file, it will not be removed from the concatentated result.
If and when
gulp-watch adds this functionality, this plugin could be updated to remove deleted files from the result.
Apache 2.0 (See LICENSE file for full details)