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

Allow constructor to be called as a function #100

Merged
merged 1 commit into from
Mar 3, 2016

Conversation

jordaaash
Copy link
Contributor

Idiomatic use for gulp seems to be to pipe to the output of a function call, which also works more naturally with requires that need a setup.

Current behavior (throwaway variable require):

var RevAll = require('gulp-rev-all');
var revision = new RevAll({ /*options*/ };

Current behavior as one-liner (non-idiomatically invoked require):

var revision = new (require('gulp-rev-all'))({ /*options*/ });

New proposed behavior (idiomatic immediately invoked require):

var revision = require('gulp-rev-all')({ /*options*/ });

What do you think?

smysnk pushed a commit that referenced this pull request Mar 3, 2016
@smysnk smysnk merged commit 049d4a9 into smysnk:master Mar 3, 2016
@jordaaash
Copy link
Contributor Author

Thanks @mix3d!

Edit: And @smysnk 💯

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