2024-05-15 05:14:01 +02:00
|
|
|
import { downloadAndUnzip } from "keycloakify/bin/shared/downloadAndUnzip";
|
2024-02-11 23:17:39 +01:00
|
|
|
import { join as pathJoin } from "path";
|
|
|
|
import { getThisCodebaseRootDirPath } from "keycloakify/bin/tools/getThisCodebaseRootDirPath";
|
2021-02-21 20:54:33 +01:00
|
|
|
|
2023-03-30 22:09:27 +00:00
|
|
|
export async function setupSampleReactProject(destDirPath: string) {
|
2024-02-11 23:17:39 +01:00
|
|
|
const thisCodebaseRootDirPath = getThisCodebaseRootDirPath();
|
|
|
|
|
2023-03-16 14:39:40 +01:00
|
|
|
await downloadAndUnzip({
|
2024-05-20 15:48:51 +02:00
|
|
|
url: "https://github.com/keycloakify/keycloakify/releases/download/v0.0.1/sample_build_dir_and_package_json.zip",
|
|
|
|
destDirPath: destDirPath,
|
|
|
|
buildOptions: {
|
|
|
|
cacheDirPath: pathJoin(
|
|
|
|
thisCodebaseRootDirPath,
|
|
|
|
"node_modules",
|
|
|
|
".cache",
|
|
|
|
"keycloakify"
|
|
|
|
),
|
|
|
|
npmWorkspaceRootDirPath: thisCodebaseRootDirPath
|
2024-02-11 23:17:39 +01:00
|
|
|
}
|
2021-03-03 02:31:02 +01:00
|
|
|
});
|
|
|
|
}
|