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/build-storybook.ts
2024-06-03 23:26:04 +02:00

20 lines
487 B
TypeScript

import * as child_process from "child_process";
import { join } from "path";
run("yarn build");
run(`node ${join("dist", "bin", "main.js")} copy-keycloak-resources-to-public`, {
env: {
...process.env,
PUBLIC_DIR_PATH: join(".storybook", "static")
}
});
run("npx build-storybook");
function run(command: string, options?: { env?: NodeJS.ProcessEnv }) {
console.log(`$ ${command}`);
child_process.execSync(command, { stdio: "inherit", ...options });
}