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 no argument? #88

Closed
tomek-he-him opened this issue Feb 27, 2015 · 2 comments
Closed

Allow no argument? #88

tomek-he-him opened this issue Feb 27, 2015 · 2 comments

Comments

@tomek-he-him
Copy link

Sometimes the name of the concatenated file doesn't matter. Like:

var gulp = require("gulp");
var dox = require("gulp-dox");
var doxme = require("gulp-doxme");
var concat = require("gulp-concat");
var rename = require("gulp-rename");

gulp.src("**.js")
  .pipe(concat("anything"))
  .pipe(dox())
  .pipe(doxme())
  .pipe(rename("Readme.md"))
  .pipe(gulp.dest("."))
  ;

I understand "" can't ever be a valid filename. But undefined casts to "undefined", same with null. Why not allow them?

It shouldn't do any harm. When someone sees a file named undefined output to his gulp.dest, it's quite obvious what happened. Without throwing any error.

@yocontra
Copy link
Member

I think it's confusing and not good API design to default an argument to "undefined" - sorry :(

@tomek-he-him
Copy link
Author

A year later: I agree!

👍

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

No branches or pull requests

2 participants