Skip to content

Commit d6a7b6e

Browse files
committed
docs(docs): keep build folders when the screenshot script skips the build
With --skip-build the script creates no build output, so it no longer removes any at the end. Refs #342
1 parent 3ea0b1a commit d6a7b6e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎scripts/docs-screenshots.mjs‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,12 @@ const SERVERS = {
503503
};
504504

505505
// Output folders the build and the dev servers create. The ones missing now are removed at the end.
506-
const built = ['dist', 'packages/devtools/dist', 'examples/analog/dist'].filter(
507-
(dir) => !existsSync(join(root, dir)),
508-
);
506+
// With --skip-build this run creates none of them, so it removes none.
507+
const built = flag('--skip-build')
508+
? []
509+
: ['dist', 'packages/devtools/dist', 'examples/analog/dist'].filter(
510+
(dir) => !existsSync(join(root, dir)),
511+
);
509512
if (!flag('--skip-build')) {
510513
// Builds the package (with the panel) and the demo, in development mode so ngDevMode is on.
511514
execFileSync('pnpm', ['build', '--configuration', 'development'], {

0 commit comments

Comments
 (0)