2023-03-18 15:49:45 +01:00
|
|
|
import { getProjectRoot } from "keycloakify/bin/tools/getProjectRoot.js";
|
2021-03-03 02:31:02 +01:00
|
|
|
import { join as pathJoin } from "path";
|
2023-03-18 15:49:45 +01:00
|
|
|
import { downloadAndUnzip } from "keycloakify/bin/tools/downloadAndUnzip";
|
2021-02-21 20:54:33 +01:00
|
|
|
|
2021-10-12 00:26:29 +02:00
|
|
|
export const sampleReactProjectDirPath = pathJoin(getProjectRoot(), "sample_react_project");
|
2021-02-21 20:54:33 +01:00
|
|
|
|
2023-03-16 14:39:40 +01:00
|
|
|
export async function setupSampleReactProject() {
|
|
|
|
await downloadAndUnzip({
|
2022-08-22 17:17:35 +07:00
|
|
|
"url": "https://github.com/InseeFrLab/keycloakify/releases/download/v0.0.1/sample_build_dir_and_package_json.zip",
|
|
|
|
"destDirPath": sampleReactProjectDirPath,
|
2022-09-08 15:43:03 +03:00
|
|
|
"cacheDirPath": pathJoin(sampleReactProjectDirPath, "build_keycloak", ".cache"),
|
|
|
|
"isSilent": false
|
2021-03-03 02:31:02 +01:00
|
|
|
});
|
|
|
|
}
|