rsms/estrella

When watching multiple TypeScript builds, make it easier to distinguish which one is which

オープン

#33 opened on 2021/03/19

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (36 件のフォーク)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (1,105 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

I'm starting to try this project out and really like it so far. When watching multiple TypeScript builds however, it's not clear which typecheck is which:

grafik

I think something as simple as this could work:

————————————————————————————
TS: OK (admin/tsconfig.json)
————————————————————————————
————————————————————————————
TS: OK (tsconfig.json)
————————————————————————————

Build script for reference:

/** Build script to use esbuild without specifying 1000 CLI options */
const { build, cliopts } = require("estrella");
const glob = require("tiny-glob");

const [opts, args] = cliopts.parse(
	["react", "Build React sources"],
	["typescript", "Build typescript soruces"],
);

if (opts.react) {
	(async () => {
		await build({
			entryPoints: ["./admin/src/index"],
			tsconfig: "./admin/tsconfig.json",
			bundle: true,
			minify: true,
			outdir: "admin/build",
			sourcemap: "external",
			logLevel: "info",
			define: {
				"process.env.NODE_ENV": '"production"',
			},
		});
	})().catch(() => process.exit(1));
}

if (opts.typescript) {
	(async () => {
		let entryPoints = await glob("./src/**/*.ts");
		entryPoints = entryPoints.filter((ep) => !ep.endsWith(".d.ts"));
		await build({
			entryPoints,
			outdir: "build",
			bundle: false,
			minify: false,
			sourcemap: "external",
			logLevel: "info",
			platform: "node",
			format: "cjs",
			target: "node10",
		});
	})().catch(() => process.exit(1));
}

コントリビューターガイド