fix build
This commit is contained in:
@ -1,24 +1,18 @@
|
||||
|
||||
import {
|
||||
setupSampleReactProject,
|
||||
setupSampleReactProject,
|
||||
sampleReactProjectDirPath
|
||||
} from "./setupSampleReactProject";
|
||||
import * as st from "scripting-tools";
|
||||
import { join as pathJoin } from "path";
|
||||
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
|
||||
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
|
||||
setupSampleReactProject();
|
||||
|
||||
|
||||
console.log(`Running main in ${sampleReactProjectDirPath}`);
|
||||
|
||||
console.log(
|
||||
st.execSync(
|
||||
`node ${pathJoin(getProjectRoot(), "dist", "bin", "build-keycloak-theme")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
)
|
||||
);
|
||||
st.execSyncTrace(
|
||||
`node ${pathJoin(getProjectRoot(), "dist", "bin", "build-keycloak-theme")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
@ -4,13 +4,9 @@ import * as st from "scripting-tools";
|
||||
import { join as pathJoin } from "path";
|
||||
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
|
||||
console.log(`Running main in ${sampleReactProjectDirPath}`);
|
||||
|
||||
console.log(
|
||||
st.execSync(
|
||||
`node ${pathJoin(getProjectRoot(), "dist", "bin", "download-sample-keycloak-themes")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
)
|
||||
);
|
||||
st.execSyncTrace(
|
||||
`node ${pathJoin(getProjectRoot(), "dist", "bin", "download-sample-keycloak-themes")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
)
|
||||
|
||||
|
||||
|
@ -1,20 +1,14 @@
|
||||
|
||||
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
import * as st from "scripting-tools";
|
||||
import { join as pathJoin, basename as pathBasename } from "path";
|
||||
import { getProjectRoot } from "../bin/tools/getProjectRoot";
|
||||
import { join as pathJoin } from "path";
|
||||
import { downloadAndUnzip } from "../bin/tools/downloadAndUnzip";
|
||||
|
||||
export const sampleReactProjectDirPath = pathJoin(getProjectRoot(), "sample_react_project");
|
||||
|
||||
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 ${url}`,
|
||||
...["unzip", "rm"].map(prg => `${prg} ${pathBasename(url)}`)
|
||||
].forEach(cmd => st.execSync(cmd, { "cwd": sampleReactProjectDirPath }));
|
||||
|
||||
}
|
||||
downloadAndUnzip({
|
||||
"url": "https://github.com/garronej/keycloak-react-theming/releases/download/v0.0.1/sample_build_dir_and_package_json.zip",
|
||||
"destDirPath": sampleReactProjectDirPath
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user