Almoste there

This commit is contained in:
Joseph Garrone
2021-02-21 20:54:33 +01:00
parent 00f15537a3
commit ee3fd977c1
7 changed files with 154 additions and 17 deletions

View File

@ -0,0 +1,20 @@
import * as st from "scripting-tools";
import { join as pathJoin } from "path";
export function setupSampleReactProject() {
const sampleReactProjectDirPath = pathJoin(__dirname, "..", "..", "sample_react_project");
st.execSync(`rm -rf ${sampleReactProjectDirPath}`);
st.execSync(`mkdir ${sampleReactProjectDirPath}`);
[
"wget https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/sample_build_dir_and_package_json.zip",
"unzip build.zip",
"rm build.zip"
].forEach(cmd => st.execSync(cmd, { "cwd": sampleReactProjectDirPath }));
return { sampleReactProjectDirPath };
}