2024-06-03 23:26:04 +02:00
|
|
|
import * as child_process from "child_process";
|
2024-07-27 00:44:32 +02:00
|
|
|
import { copyKeycloakResourcesToStorybookStaticDir } from "./copyKeycloakResourcesToStorybookStaticDir";
|
2024-06-03 23:26:04 +02:00
|
|
|
|
2024-07-27 00:44:32 +02:00
|
|
|
(async () => {
|
|
|
|
run("yarn build");
|
2024-06-03 23:26:04 +02:00
|
|
|
|
2024-07-27 00:44:32 +02:00
|
|
|
await copyKeycloakResourcesToStorybookStaticDir();
|
2024-06-03 23:26:04 +02:00
|
|
|
|
2024-07-27 00:44:32 +02:00
|
|
|
run("npx build-storybook");
|
|
|
|
})();
|
2024-06-03 23:26:04 +02:00
|
|
|
|
|
|
|
function run(command: string, options?: { env?: NodeJS.ProcessEnv }) {
|
|
|
|
console.log(`$ ${command}`);
|
|
|
|
|
|
|
|
child_process.execSync(command, { stdio: "inherit", ...options });
|
|
|
|
}
|