-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Per http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options should allow passing environment variables.
I'd make a pull request but I'm lazy. Here is the only change line 38 of index.js:
// spawn program
var program = cp.spawn(options.cmd, options.args, options.opts);
Will allow me to do this:
gulp.src("./src/images/*.{jpg,png,gif}", { buffer: false })
.pipe(spawn({
cmd: "convert",
args: [
"-",
"-resize",
"50%",
"-"
],
//ENV
opts: { env: {"NODE_ENV": "booya"} },
// optional
filename: function(base, ext) {
return base + "-half" + ext;
}
}))
.pipe(gulp.dest("./dist/images/"));
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels