keycloak_theme/test/bin/setupSampleReactProject.ts

17 lines
744 B
TypeScript
Raw Normal View History

2024-02-11 23:17:39 +01:00
import { downloadAndUnzip } from "keycloakify/bin/downloadAndUnzip";
import { join as pathJoin } from "path";
import { getThisCodebaseRootDirPath } from "keycloakify/bin/tools/getThisCodebaseRootDirPath";
2021-02-21 20:54:33 +01: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({
2023-03-24 04:14:41 +01:00
"url": "https://github.com/keycloakify/keycloakify/releases/download/v0.0.1/sample_build_dir_and_package_json.zip",
2023-08-21 05:54:17 +02:00
"destDirPath": destDirPath,
2024-02-11 23:17:39 +01:00
"buildOptions": {
"cacheDirPath": pathJoin(thisCodebaseRootDirPath, "node_modules", ".cache", "keycloakify"),
"npmWorkspaceRootDirPath": thisCodebaseRootDirPath
}
2021-03-03 02:31:02 +01:00
});
}