.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
20 lines
487 B
TypeScript
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 });
|
|
}
|