Files
.github
.storybook
patches
scripts
build-storybook.ts
build.ts
dump-keycloak-realm.ts
generate-i18n-messages.ts
grant-exec-perms.ts
link-in-app.ts
link-in-starter.ts
start-storybook.ts
startRebuildOnSrcChange.ts
src
stories
test
.all-contributorsrc
.gitattributes
.gitignore
.prettierignore
.prettierrc.json
CONTRIBUTING.md
LICENSE
README.md
package.json
renovate.json
tsproject.json
vitest.config.ts
yarn.lock
keycloak_theme/scripts/link-in-starter.ts

29 lines
827 B
TypeScript
Raw Normal View History

import * as child_process from "child_process";
import * as fs from "fs";
import { join } from "path";
import { startRebuildOnSrcChange } from "./startRebuildOnSrcChange";
2024-05-20 15:48:51 +02:00
fs.rmSync("node_modules", { recursive: true, force: true });
fs.rmSync("dist", { recursive: true, force: true });
fs.rmSync(".yarn_home", { recursive: true, force: true });
run("yarn install");
run("yarn build");
2024-05-20 15:48:51 +02:00
fs.rmSync(join("..", "keycloakify-starter", "node_modules"), {
recursive: true,
force: true
});
2024-05-20 15:48:51 +02:00
run("yarn install", { cwd: join("..", "keycloakify-starter") });
2024-06-15 11:23:53 +02:00
run(`npx tsx ${join("scripts", "link-in-app.ts")} keycloakify-starter`);
startRebuildOnSrcChange();
function run(command: string, options?: { cwd: string }) {
console.log(`$ ${command}`);
2024-05-20 15:48:51 +02:00
child_process.execSync(command, { stdio: "inherit", ...options });
}