mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-28 05:10:17 +08:00
15 lines
407 B
TypeScript
15 lines
407 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(_, { sandboxDir }) {
|
|
return pathExists(join(sandboxDir, 'storybook-static'));
|
|
},
|
|
async run(_, { sandboxDir }) {
|
|
return exec(`yarn build-storybook --quiet`, { cwd: sandboxDir });
|
|
},
|
|
};
|