esm - restore default header

pull/229915/head
Benjamin Pasero 2024-09-27 08:05:16 +02:00
parent 02fec8e19c
commit 87f3486f5f
No known key found for this signature in database
GPG Key ID: E6380CC4C8219E65
3 changed files with 13 additions and 3 deletions

View File

@ -8,9 +8,10 @@
"**/.DS_Store": true,
".vscode-test": true,
"cli/target": true,
"build/**/*.js.map": true,
"build/**/*.js": {
"when": "$(basename).ts"
}
},
},
"files.associations": {
"cglicenses.json": "jsonc",

View File

@ -19,6 +19,11 @@ const postcss_1 = require("./postcss");
const esbuild = require("esbuild");
const sourcemaps = require("gulp-sourcemaps");
const REPO_ROOT_PATH = path.join(__dirname, '../..');
const DEFAULT_FILE_HEADER = [
'/*!--------------------------------------------------------',
' * Copyright (C) Microsoft Corporation. All rights reserved.',
' *--------------------------------------------------------*/'
].join('\n');
function optimizeESMTask(opts) {
const resourcesStream = es.through(); // this stream will contain the resources
const bundlesStream = es.through(); // this stream will contain the bundled files
@ -119,7 +124,6 @@ function optimizeESMTask(opts) {
files.push(new VinylFile(fileProps));
}
});
// await task; // FORCE serial bundling (makes debugging easier)
tasks.push(task);
}
await Promise.all(tasks);

View File

@ -39,6 +39,12 @@ export interface IOptimizeESMTaskOpts {
fileContentMapper?: (contents: string, path: string) => string;
}
const DEFAULT_FILE_HEADER = [
'/*!--------------------------------------------------------',
' * Copyright (C) Microsoft Corporation. All rights reserved.',
' *--------------------------------------------------------*/'
].join('\n');
function optimizeESMTask(opts: IOptimizeESMTaskOpts): NodeJS.ReadWriteStream {
const resourcesStream = es.through(); // this stream will contain the resources
const bundlesStream = es.through(); // this stream will contain the bundled files
@ -158,7 +164,6 @@ function optimizeESMTask(opts: IOptimizeESMTaskOpts): NodeJS.ReadWriteStream {
}
});
// await task; // FORCE serial bundling (makes debugging easier)
tasks.push(task);
}