fix(core): update

This commit is contained in:
2022-03-15 13:01:18 +01:00
parent 687b83bafd
commit cf9ca73cd8
4 changed files with 61 additions and 22 deletions

View File

@ -2,11 +2,12 @@ import * as plugins from './tsbundle.plugins.js';
import { logger } from './tsbundle.logging.js';
export class TsBundle {
public async buildTest(
public async buildTest (
cwdArg: string,
fromArg: string,
toArg: string,
bundlerArg: 'rollup' | 'parcel'
bundlerArg: 'rollup' | 'parcel',
argvArg: any
) {
const done = plugins.smartpromise.defer();
const threadsimple = new plugins.smartspawn.ThreadSimple(
@ -20,6 +21,7 @@ export class TsBundle {
tsbundleFrom: fromArg,
tsbundleTo: toArg,
tsbundleBundler: bundlerArg,
tsbundleArgv: argvArg,
},
}
);
@ -30,7 +32,13 @@ export class TsBundle {
await done.promise;
}
public async buildProduction(cwdArg: string, fromArg: string, toArg: string) {
public async buildProduction (
cwdArg: string,
fromArg: string,
toArg: string,
bundlerArg: 'rollup' | 'parcel',
argvArg: any
) {
const done = plugins.smartpromise.defer();
const threadsimple = new plugins.smartspawn.ThreadSimple(
plugins.path.join(plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url), './tsbundle.class.tsbundleprocess.js'),
@ -42,6 +50,8 @@ export class TsBundle {
tsbundleCwd: cwdArg,
tsbundleFrom: fromArg,
tsbundleTo: toArg,
tsbundleBundler: bundlerArg,
tsbundleArgv: argvArg,
},
}
);