BREAKING(structure): modernize internal structure and support unpacking

This commit is contained in:
2025-12-13 22:59:58 +00:00
parent 4ebc37fa5a
commit e5fcbb9a09
19 changed files with 1605 additions and 1318 deletions

View File

@@ -1,19 +1,21 @@
import { tap, expect } from '@git.zone/tstest/tapbundle';
import * as tsbuild from '../ts/index.js';
import { TsCompiler } from '../ts/index.js';
let assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
const assetfiles: string[] = ['./test/assets/tocompile.ts', './test/assets/tocompile2.ts'];
let assetfiles2 = {
const assetfiles2 = {
'./test/assets/**/!(*.d.ts|*.js|output)': './test/assets/output',
};
tap.test('should convert files from an array with single files to output', async (tools) => {
tsbuild.compileFileArray(assetfiles, { outDir: './test/assets/output' });
tap.test('should compile files from an array', async () => {
const compiler = new TsCompiler();
await compiler.compileFilesOrThrow(assetfiles, { outDir: './test/assets/output' });
});
tap.test('should convert files from an array with single files to output', async (tools) => {
tsbuild.compileGlobStringObject(assetfiles2);
tap.test('should compile files from glob pattern object', async () => {
const compiler = new TsCompiler();
await compiler.compileGlob(assetfiles2);
});
tap.start();