feat(core): Integrate Rolldown as optional bundler, migrate filesystem to smartfs, and update bundler/tooling
This commit is contained in:
@@ -3,12 +3,11 @@ import * as interfaces from './interfaces/index.js';
|
||||
import { logger } from './tsbundle.logging.js';
|
||||
|
||||
export class TsBundle {
|
||||
|
||||
public async build(
|
||||
cwdArg: string,
|
||||
fromArg: string = './ts_web/index.ts',
|
||||
toArg: string = './dist_bundle/bundle.js',
|
||||
argvArg: interfaces.ICliOptions
|
||||
argvArg: interfaces.ICliOptions,
|
||||
) {
|
||||
const done = plugins.smartpromise.defer();
|
||||
const getBundlerPath = () => {
|
||||
@@ -21,20 +20,20 @@ export class TsBundle {
|
||||
default:
|
||||
return './mod_esbuild/index.child.js';
|
||||
}
|
||||
}
|
||||
};
|
||||
const transportOptions: interfaces.IEnvTransportOptions = {
|
||||
cwd: cwdArg,
|
||||
from: fromArg,
|
||||
to: toArg,
|
||||
mode: argvArg && argvArg.production ? 'production' : 'test',
|
||||
argv: {
|
||||
...argvArg
|
||||
}
|
||||
}
|
||||
argv: {
|
||||
...argvArg,
|
||||
},
|
||||
};
|
||||
const threadsimple = new plugins.smartspawn.ThreadSimple(
|
||||
plugins.path.join(
|
||||
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||
getBundlerPath()
|
||||
getBundlerPath(),
|
||||
),
|
||||
[],
|
||||
{
|
||||
@@ -42,7 +41,7 @@ export class TsBundle {
|
||||
...process.env,
|
||||
transportOptions: JSON.stringify(transportOptions),
|
||||
},
|
||||
}
|
||||
},
|
||||
);
|
||||
const childProcess = await threadsimple.start();
|
||||
childProcess.on('exit', (status) => {
|
||||
|
||||
Reference in New Issue
Block a user