Compare commits

...

2 Commits

Author SHA1 Message Date
60bd6621c8 Release candidate 2024-06-24 02:43:03 +02:00
b5f6262763 Support cd in running build script in webpack 2024-06-24 02:42:44 +02:00
2 changed files with 18 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "keycloakify",
"version": "10.0.0-rc.92",
"version": "10.0.0-rc.93",
"description": "Create Keycloak themes using React",
"repository": {
"type": "git",

View File

@ -4,6 +4,7 @@ import { assert } from "tsafe/assert";
import type { BuildContext } from "../shared/buildContext";
import chalk from "chalk";
import { sep as pathSep, join as pathJoin } from "path";
import { getAbsoluteAndInOsFormatPath } from "../tools/getAbsoluteAndInOsFormatPath";
export type BuildContextLike = {
projectDirPath: string;
@ -122,15 +123,28 @@ async function appBuild_webpack(params: {
process.exit(-1);
}
let commandCwd = buildContext.bundler.packageJsonDirPath;
for (const subCommand of appBuildSubCommands) {
const dIsSuccess = new Deferred<boolean>();
console.log(chalk.blue(`Running: '${subCommand}'`));
const [command, ...args] = subCommand.split(" ");
if (command === "cd") {
const [pathIsh] = args;
commandCwd = getAbsoluteAndInOsFormatPath({
pathIsh,
cwd: commandCwd
});
continue;
}
console.log(chalk.blue(`Running: '${subCommand}'`));
const child = child_process.spawn(command, args, {
cwd: buildContext.bundler.packageJsonDirPath,
cwd: commandCwd,
env: {
...process.env,
PATH: (() => {