Add script for downloading base themes

This commit is contained in:
Joseph Garrone
2021-02-21 23:06:42 +01:00
parent 6ef4348c99
commit 0d5462d2f1
8 changed files with 90 additions and 42 deletions

View File

@ -3,31 +3,35 @@ import { generateJavaStackFiles } from "./generateJavaStackFiles";
import type { ParsedPackageJson } from "./generateJavaStackFiles";
import { join as pathJoin } from "path";
import * as child_process from "child_process";
import { generateDebugFiles } from "./generateDebugFiles";
import { generateDebugFiles } from "./generateDebugFiles";
const reactProjectDirPath = process.cwd();
const parsedPackageJson: ParsedPackageJson = require(pathJoin(reactProjectDirPath, "package.json"));
const keycloakThemeBuildingDirPath = pathJoin(reactProjectDirPath, "build_keycloak");
export const keycloakThemeBuildingDirPath = pathJoin(reactProjectDirPath, "build_keycloak");
generateKeycloakThemeResources({
keycloakThemeBuildingDirPath,
"reactAppBuildDirPath": pathJoin(reactProjectDirPath, "build"),
"themeName": parsedPackageJson.name
});
if (require.main === module) {
generateJavaStackFiles({
parsedPackageJson,
keycloakThemeBuildingDirPath
});
generateKeycloakThemeResources({
keycloakThemeBuildingDirPath,
"reactAppBuildDirPath": pathJoin(reactProjectDirPath, "build"),
"themeName": parsedPackageJson.name
});
child_process.execSync(
"mvn package",
{ "cwd": keycloakThemeBuildingDirPath }
);
generateJavaStackFiles({
parsedPackageJson,
keycloakThemeBuildingDirPath
});
generateDebugFiles({
keycloakThemeBuildingDirPath,
"packageJsonName": parsedPackageJson.name
});
child_process.execSync(
"mvn package",
{ "cwd": keycloakThemeBuildingDirPath }
);
generateDebugFiles({
keycloakThemeBuildingDirPath,
"packageJsonName": parsedPackageJson.name
});
}