mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
fix: Close #189556, gulp task do not display task name
This commit is contained in:
@@ -95,7 +95,7 @@ function createCompile(src: string, build: boolean, emitError: boolean, transpil
|
||||
|
||||
export function transpileTask(src: string, out: string, swc: boolean): () => NodeJS.ReadWriteStream {
|
||||
|
||||
return function () {
|
||||
const task = () => {
|
||||
|
||||
const transpile = createCompile(src, false, true, { swc });
|
||||
const srcPipe = gulp.src(`${src}/**`, { base: `${src}` });
|
||||
@@ -104,11 +104,14 @@ export function transpileTask(src: string, out: string, swc: boolean): () => Nod
|
||||
.pipe(transpile())
|
||||
.pipe(gulp.dest(out));
|
||||
};
|
||||
|
||||
task.taskName = `transpile-${path.basename(src)}`;
|
||||
return task;
|
||||
}
|
||||
|
||||
export function compileTask(src: string, out: string, build: boolean, options: { disableMangle?: boolean } = {}): () => NodeJS.ReadWriteStream {
|
||||
|
||||
return function () {
|
||||
const task = () => {
|
||||
|
||||
if (os.totalmem() < 4_000_000_000) {
|
||||
throw new Error('compilation requires 4GB of RAM');
|
||||
@@ -150,11 +153,14 @@ export function compileTask(src: string, out: string, build: boolean, options: {
|
||||
.pipe(compile())
|
||||
.pipe(gulp.dest(out));
|
||||
};
|
||||
|
||||
task.taskName = `compile-${path.basename(src)}`;
|
||||
return task;
|
||||
}
|
||||
|
||||
export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteStream {
|
||||
|
||||
return function () {
|
||||
const task = () => {
|
||||
const compile = createCompile('src', build, false, false);
|
||||
|
||||
const src = gulp.src('src/**', { base: 'src' });
|
||||
@@ -168,6 +174,8 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt
|
||||
.pipe(util.incremental(compile, src, true))
|
||||
.pipe(gulp.dest(out));
|
||||
};
|
||||
task.taskName = `watch-${path.basename(out)}`;
|
||||
return task;
|
||||
}
|
||||
|
||||
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
|
||||
|
||||
Reference in New Issue
Block a user