Fix bin test script

This commit is contained in:
garronej 2023-03-16 14:39:40 +01:00
parent 93fdcb8739
commit 0e42009798
2 changed files with 14 additions and 10 deletions

View File

@ -4,14 +4,18 @@ import * as st from "scripting-tools";
import { join as pathJoin } from "path";
import { getProjectRoot } from "../../bin/tools/getProjectRoot.js";
setupSampleReactProject();
(async () => {
await setupSampleReactProject();
const binDirPath = pathJoin(getProjectRoot(), "dist_test", "bin");
const binDirPath = pathJoin(getProjectRoot(), "dist_test", "bin");
st.execSyncTrace(
console.log("===>", binDirPath);
st.execSyncTrace(
//`node ${pathJoin(binDirPath, "keycloakify")} --external-assets`,
`node ${pathJoin(binDirPath, "keycloakify")}`,
{ "cwd": sampleReactProjectDirPath }
);
);
st.execSyncTrace(`node ${pathJoin(binDirPath, "download-builtin-keycloak-theme")}`, { "cwd": sampleReactProjectDirPath });
st.execSyncTrace(`node ${pathJoin(binDirPath, "download-builtin-keycloak-theme")}`, { "cwd": sampleReactProjectDirPath });
})();

View File

@ -4,8 +4,8 @@ import { downloadAndUnzip } from "../../bin/tools/downloadAndUnzip";
export const sampleReactProjectDirPath = pathJoin(getProjectRoot(), "sample_react_project");
export function setupSampleReactProject() {
downloadAndUnzip({
export async function setupSampleReactProject() {
await downloadAndUnzip({
"url": "https://github.com/InseeFrLab/keycloakify/releases/download/v0.0.1/sample_build_dir_and_package_json.zip",
"destDirPath": sampleReactProjectDirPath,
"cacheDirPath": pathJoin(sampleReactProjectDirPath, "build_keycloak", ".cache"),