esm - `fancyLog` for bundle messages (#230638)

pull/230593/head
Benjamin Pasero 2024-10-06 18:27:18 +02:00 committed by GitHub
parent 9944c35524
commit 89f039ff9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -17,6 +17,8 @@ const bundle = require("./bundle");
const postcss_1 = require("./postcss");
const esbuild = require("esbuild");
const sourcemaps = require("gulp-sourcemaps");
const fancyLog = require("fancy-log");
const ansiColors = require("ansi-colors");
const REPO_ROOT_PATH = path.join(__dirname, '../..');
const DEFAULT_FILE_HEADER = [
'/*!--------------------------------------------------------',
@ -42,7 +44,7 @@ function bundleESMTask(opts) {
const files = [];
const tasks = [];
for (const entryPoint of entryPoints) {
console.log(`[bundle] '${entryPoint.name}'`);
fancyLog(`Bundled entry point: ${ansiColors.yellow(entryPoint.name)}...`);
// support for 'dest' via esbuild#in/out
const dest = entryPoint.dest?.replace(/\.[^/.]+$/, '') ?? entryPoint.name;
// banner contents

View File

@ -14,6 +14,8 @@ import * as bundle from './bundle';
import { gulpPostcss } from './postcss';
import * as esbuild from 'esbuild';
import * as sourcemaps from 'gulp-sourcemaps';
import * as fancyLog from 'fancy-log';
import * as ansiColors from 'ansi-colors';
const REPO_ROOT_PATH = path.join(__dirname, '../..');
@ -72,7 +74,7 @@ function bundleESMTask(opts: IBundleESMTaskOpts): NodeJS.ReadWriteStream {
const tasks: Promise<any>[] = [];
for (const entryPoint of entryPoints) {
console.log(`[bundle] '${entryPoint.name}'`);
fancyLog(`Bundled entry point: ${ansiColors.yellow(entryPoint.name)}...`);
// support for 'dest' via esbuild#in/out
const dest = entryPoint.dest?.replace(/\.[^/.]+$/, '') ?? entryPoint.name;