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

Remove gulp-shell from blacklist #1353

Closed
sbussard opened this issue Oct 27, 2015 · 7 comments
Closed

Remove gulp-shell from blacklist #1353

sbussard opened this issue Oct 27, 2015 · 7 comments

Comments

@sbussard
Copy link

Please remove gulp-shell from the blacklist.

from blacklist.json

"gulp-shell": "duplicate of gulp-exec",

The reason stated is not true, as gulp-exec lacks feature parity with gulp-shell.
There are more forks and stars for gulp-shell on github vs. those numbers for gulp-exec.
To me, gulp-shell is also much more intuitive than gulp-exec.

@callumacrae
Copy link
Member

From the gulp-shell docs:

gulp.task('shorthand', shell.task([
  'echo hello',
  'echo world'
]))

vs this from the gulp-exec docs:

Note: If you just want to run a command, just run the command, don't use this plugin:

That alone seems reason to prefer gulp-exec to gulp-shell: gulp-shell are promoting a massive anti-pattern.

The entire reason gulp-shell was created is so it could be used in a way that shouldn't be in a gulp plugin: sun-zheng-an/gulp-shell#1 (comment)

@yocontra
Copy link
Member

Yeah, gulp-shell is promoting huge anti-patterns. I've opened an issue about this and it was closed with no resolution.

@callumacrae
Copy link
Member

The issue, for reference: sun-zheng-an/gulp-shell#55

Possibly updating the blacklist reason would be a good idea? "promotes anti-patterns, use gulp-exec or child_process"?

@phated
Copy link
Member

phated commented Oct 27, 2015

Yeah, @callumacrae. Let's get that in a different PR

@Sayvai
Copy link

Sayvai commented Nov 1, 2015

I'm using gulp-shell because no matter how hard i try, I am was unable to finish a gulp task (i.e. return out stream) when successfully executing a shell command through child_process.spawn.

Below is sample code I am referring to above:

var spawn = require('child_process').spawn;

gulp.task('test', function (cb) {
    var ls = spawn('karma', ['start', 'karma.conf.js'], {stdio: 'inherit'});

    ls.on('close', function (code) {
        console.log('child process exited with code ' + code);
    });
});

Would you know how i could finish the above task? It would be great, just so that i do not have to rely on gulp-shell?.

@TrySound
Copy link
Contributor

TrySound commented Nov 1, 2015

@Sayvai Call cb on close

@Sayvai
Copy link

Sayvai commented Nov 1, 2015

@TrySound - Your solution above worked. Genius! Thank you.

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

6 participants