Skip to content
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

export gulp #331

Closed
wants to merge 1 commit into from
Closed

export gulp #331

wants to merge 1 commit into from

Conversation

tkellen
Copy link

@tkellen tkellen commented Mar 6, 2014

If you mandate that gulp is exported from gulpfiles, users can easily require them and run tasks directly from their code without the cli.

@tkellen
Copy link
Author

tkellen commented Mar 6, 2014

Also, it would probably be a good practice to mandate that people make their own instance of gulp in a gulpfile. The current gulpfile configuration format mutates the required gulp globally.

@phated
Copy link
Member

phated commented Mar 6, 2014

I believe it was a design decision early on to make the gulp module export a singleton. Being a singleton lets you require('gulp') anywhere and add or execute any tasks.

@yocontra
Copy link
Member

yocontra commented Mar 6, 2014

I made the decision early on to make the default usage of gulp be a singleton, but allow people to create custom instances if they need to (via new gulp.Gulp. This was done for ease of use and fits the most common case well.

@yocontra
Copy link
Member

Closing in favor of #355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants