Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert demo to Gulp 4.0.0+ #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
phated merged 1 commit into gulpjs:source from 13rac1:upgrade-demo
Jan 2, 2019
Merged

Convert demo to Gulp 4.0.0+ #99

phated merged 1 commit into gulpjs:source from 13rac1:upgrade-demo
Jan 2, 2019

Conversation

Copy link
Contributor

@13rac1 13rac1 commented Dec 28, 2018

Conversion of the Gulp demo/example code from API 3 to 4.

  • HighlightJS automatically and manually applied.
  • Switched from var to const for require() calls.

demo rendered

Conversion of the Gulp demo/example code from API 3 to 4.
* HighlightJS automatically and manually applied.
* Switched from `var` to `const` for `require()` calls.
Copy link

@attaradev attaradev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, I was about to do the same and saw this PR. Kindly merge it to reflect the current state of gulp. Because the current demo is breaking and frustrating a lot of developers thereby affecting the developer experience.

Copy link
Member

yocontra commented Jan 2, 2019

This can be simplified a lot IMO - the demo is supposed to be as simple and readable as possible.

  • 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
13rac1 reacted with thumbs up emoji

Copy link
Member

phated commented Jan 2, 2019

I'm going to clean this up and get it released today

13rac1 reacted with hooray emoji

@phated phated merged commit 28738ef into gulpjs:source Jan 2, 2019
@13rac1 13rac1 deleted the upgrade-demo branch January 2, 2019 21:29
Copy link
Contributor Author

13rac1 commented Jan 2, 2019

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.

Copy link
Member

phated commented Jan 2, 2019

As per the documentation rewrite:

  • Named functions are preferred over arrow functions
  • Destructuring is preferred over using gulp namespace

Those changes have stayed in my merge but I cleaned up how they are displayed on desktop and mobile.

13rac1 and attaradev reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
1 more reviewer

@attaradev attaradev attaradev approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /