mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
15 lines
391 B
TypeScript
15 lines
391 B
TypeScript
import { pathExists } from 'fs-extra';
|
|
import { join } from 'path';
|
|
import type { Task } from '../task';
|
|
import { exec } from '../utils/exec';
|
|
|
|
export const build: Task = {
|
|
before: ['create'],
|
|
async ready(_, { builtSandboxDir }) {
|
|
return pathExists(builtSandboxDir);
|
|
},
|
|
async run(_, { sandboxDir }) {
|
|
return exec(`yarn build-storybook --quiet`, { cwd: sandboxDir });
|
|
},
|
|
};
|