Closed 13rac1 closed 5 years ago
This can be simplified a lot IMO - the demo is supposed to be as simple and readable as possible.
gulp
I'm going to clean this up and get it released today
the demo is supposed to be as simple and readable as possible.
@contra I agree, but wanted to open this PR with the minimal line count changes. I'd have been happy to refactor further pre-merge. @phated merging works though!
Destructuring is a bit of a stretch here, would prefer just accessing off gulp Arrow functions on the tasks would be nice Export each task function
I thought it strange too. That is what the documentation shows, so I matched it. The docs should be updated for consistency if this example is changed to use arrow functions or direct gulp
access.
Example:
const { src, dest } = require('gulp');
function streamTask() {
return src('*.js')
.pipe(dest('output'));
}
From https://gulpjs.com/docs/en/getting-started/async-completion#returning-a-stream and copied for posterity in case of change.
As per the documentation rewrite:
gulp
namespaceThose changes have stayed in my merge but I cleaned up how they are displayed on desktop and mobile.
Conversion of the Gulp demo/example code from API 3 to 4.
var
toconst
forrequire()
calls.