fix: multibuild
This commit is contained in:
parent
bb7d78fdcf
commit
63ba2554b8
|
@ -7,7 +7,10 @@ const {
|
||||||
LATUS_ONLY_BUILD = '',
|
LATUS_ONLY_BUILD = '',
|
||||||
LATUS_BABEL_CONFIG = require.resolve('./.babelrc.js'),
|
LATUS_BABEL_CONFIG = require.resolve('./.babelrc.js'),
|
||||||
} = process.env;
|
} = process.env;
|
||||||
const onlyBuilds = LATUS_ONLY_BUILD.split(',').map((name) => name.trim());
|
const onlyBuilds = LATUS_ONLY_BUILD
|
||||||
|
.split(',')
|
||||||
|
.map((name) => name.trim())
|
||||||
|
.filter((e) => e);
|
||||||
|
|
||||||
R('@babel/register')({
|
R('@babel/register')({
|
||||||
configFile: LATUS_BABEL_CONFIG,
|
configFile: LATUS_BABEL_CONFIG,
|
||||||
|
@ -20,7 +23,7 @@ const gatherConfigs = async () => {
|
||||||
await Promise.all(Object.entries(configs).map(async ([k, v]) => [k, await v])),
|
await Promise.all(Object.entries(configs).map(async ([k, v]) => [k, await v])),
|
||||||
);
|
);
|
||||||
latus.invokeFlat('@latus/core/build/alter', configs);
|
latus.invokeFlat('@latus/core/build/alter', configs);
|
||||||
if (0 === Object.keys(onlyBuilds).length) {
|
if (0 === Object.keys(configs).length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
configs = Object.fromEntries(
|
configs = Object.fromEntries(
|
||||||
|
@ -33,7 +36,6 @@ const gatherConfigs = async () => {
|
||||||
.filter((e) => !!e)
|
.filter((e) => !!e)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return configs;
|
return configs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user