Fix many little bugs

This commit is contained in:
Joseph Garrone
2021-02-21 21:27:42 +01:00
parent 98ff75daff
commit 4c21446390
10 changed files with 1173 additions and 64 deletions

View File

@ -1,6 +1,6 @@
import * as st from "scripting-tools";
import { join as pathJoin } from "path";
import { join as pathJoin, basename as pathBasename } from "path";
export function setupSampleReactProject() {
@ -9,10 +9,11 @@ export function setupSampleReactProject() {
st.execSync(`rm -rf ${sampleReactProjectDirPath}`);
st.execSync(`mkdir ${sampleReactProjectDirPath}`);
const url = "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/sample_build_dir_and_package_json.zip";
[
"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"
`wget ${url}`,
...["unzip", "rm"].map(prg => `${prg} ${pathBasename(url)}`)
].forEach(cmd => st.execSync(cmd, { "cwd": sampleReactProjectDirPath }));
return { sampleReactProjectDirPath };