Add script for downloading base themes
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
|
||||
import { setupSampleReactProject } from "./setupSampleReactProject";
|
||||
import * as st from "scripting-tools";
|
||||
import { join as pathJoin } from "path";
|
||||
|
||||
const { sampleReactProjectDirPath } = setupSampleReactProject();
|
||||
|
||||
process.chdir(sampleReactProjectDirPath);
|
||||
|
||||
console.log(`Running main in ${sampleReactProjectDirPath}`);
|
||||
|
||||
import("../bin/build-keycloak-theme");
|
||||
st.execSync(
|
||||
`node ${pathJoin(__dirname, "../bin/build-keycloak-theme")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
);
|
||||
|
||||
|
||||
|
13
src/test/download-sample-keycloak-themes.ts
Normal file
13
src/test/download-sample-keycloak-themes.ts
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
import { sampleReactProjectDirPath } from "./setupSampleReactProject";
|
||||
import * as st from "scripting-tools";
|
||||
import { join as pathJoin } from "path";
|
||||
|
||||
console.log(`Running main in ${sampleReactProjectDirPath}`);
|
||||
|
||||
st.execSync(
|
||||
`node ${pathJoin(__dirname, "../bin/download-sample-keycloak-themes")}`,
|
||||
{ "cwd": sampleReactProjectDirPath }
|
||||
);
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
import * as st from "scripting-tools";
|
||||
import { join as pathJoin, basename as pathBasename } from "path";
|
||||
|
||||
export function setupSampleReactProject() {
|
||||
export const sampleReactProjectDirPath = pathJoin(__dirname, "..", "..", "sample_react_project");
|
||||
|
||||
const sampleReactProjectDirPath = pathJoin(__dirname, "..", "..", "sample_react_project");
|
||||
export function setupSampleReactProject() {
|
||||
|
||||
st.execSync(`rm -rf ${sampleReactProjectDirPath}`);
|
||||
st.execSync(`mkdir ${sampleReactProjectDirPath}`);
|
||||
|
Reference in New Issue
Block a user