Fixes #56255: Remove unnecessary code
This commit is contained in:
parent
d31da69aaf
commit
7ade707974
38
gulpfile.js
38
gulpfile.js
|
@ -36,42 +36,12 @@ gulp.task('clean-build', ['clean-client-build', 'clean-extensions-build']);
|
||||||
gulp.task('compile-build', ['compile-client-build', 'compile-extensions-build']);
|
gulp.task('compile-build', ['compile-client-build', 'compile-extensions-build']);
|
||||||
gulp.task('watch-build', ['watch-client-build', 'watch-extensions-build']);
|
gulp.task('watch-build', ['watch-client-build', 'watch-extensions-build']);
|
||||||
|
|
||||||
var ALL_EDITOR_TASKS = [
|
|
||||||
// Always defined tasks
|
|
||||||
'clean-client',
|
|
||||||
'compile-client',
|
|
||||||
'watch-client',
|
|
||||||
'clean-client-build',
|
|
||||||
'compile-client-build',
|
|
||||||
'watch-client-build',
|
|
||||||
|
|
||||||
// Editor tasks (defined in gulpfile.editor)
|
|
||||||
'clean-optimized-editor',
|
|
||||||
'optimize-editor',
|
|
||||||
'clean-minified-editor',
|
|
||||||
'minify-editor',
|
|
||||||
'clean-editor-distro',
|
|
||||||
'editor-distro',
|
|
||||||
'analyze-editor-distro',
|
|
||||||
|
|
||||||
// hygiene tasks
|
|
||||||
'tslint',
|
|
||||||
'hygiene',
|
|
||||||
];
|
|
||||||
|
|
||||||
var runningEditorTasks = process.argv.length > 2 && process.argv.slice(2).every(function (arg) { return (ALL_EDITOR_TASKS.indexOf(arg) !== -1); });
|
|
||||||
|
|
||||||
process.on('unhandledRejection', (reason, p) => {
|
process.on('unhandledRejection', (reason, p) => {
|
||||||
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (runningEditorTasks) {
|
// Load all the gulpfiles only if running tasks other than the editor tasks
|
||||||
require(`./build/gulpfile.editor`);
|
const build = path.join(__dirname, 'build');
|
||||||
require(`./build/gulpfile.hygiene`);
|
require('glob').sync('gulpfile.*.js', { cwd: build })
|
||||||
} else {
|
.forEach(f => require(`./build/${f}`));
|
||||||
// Load all the gulpfiles only if running tasks other than the editor tasks
|
|
||||||
const build = path.join(__dirname, 'build');
|
|
||||||
require('glob').sync('gulpfile.*.js', { cwd: build })
|
|
||||||
.forEach(f => require(`./build/${f}`));
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue