Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pipeStdout: false, // default = false, true means stdout is written to file.contents
customTemplatingThing: 'build', // content passed to gutil.template()
cwd: __dirname + '/src/'
};
const reportOptions = {
err: true, // default = true, false means don't write err
stderr: true, // default = true, false means don't write stderr
stdout: true // default = true, false means don't write stdout
};
console.log(options.cwd);
if (fs.existsSync(__dirname + '/src/node_modules/react-scripts/scripts/build.js')) {
return gulp.src(__dirname + '/src/node_modules/react-scripts/scripts/build.js')
.pipe(exec('node <%= file.path %>', options))
.pipe(exec.reporter(reportOptions)).pipe(connect.reload());
} else {
return gulp.src(__dirname + '/node_modules/react-scripts/scripts/build.js')
.pipe(exec('node <%= file.path %>', options))
.pipe(exec.reporter(reportOptions)).pipe(connect.reload());
}
}
const reportOptions = {
err: true, // default = true, false means don't write err
stderr: true, // default = true, false means don't write stderr
stdout: true // default = true, false means don't write stdout
};
console.log(options.cwd);
if (fs.existsSync(__dirname + '/src/node_modules/react-scripts/scripts/build.js')) {
return gulp.src(__dirname + '/src/node_modules/react-scripts/scripts/build.js')
.pipe(exec('node <%= file.path %>', options))
.pipe(exec.reporter(reportOptions)).pipe(connect.reload());
} else {
return gulp.src(__dirname + '/node_modules/react-scripts/scripts/build.js')
.pipe(exec('node <%= file.path %>', options))
.pipe(exec.reporter(reportOptions)).pipe(connect.reload());
}
}
const reportOptions = {
err: true, // default = true, false means don't write err
stderr: true, // default = true, false means don't write stderr
stdout: true // default = true, false means don't write stdout
};
console.log(options.cwd);
if (fs.existsSync(__dirname + '/src/node_modules/react-scripts/scripts/build.js')) {
return gulp.src(__dirname + '/src/node_modules/react-scripts/scripts/build.js')
.pipe(exec('node <%= file.path %>', options))
.pipe(exec.reporter(reportOptions)).pipe(connect.reload());
} else {
return gulp.src(__dirname + '/node_modules/react-scripts/scripts/build.js')
.pipe(exec('node <%= file.path %>', options))
.pipe(exec.reporter(reportOptions)).pipe(connect.reload());
}
}