2022-08-12 15:14:16 +10:00

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 });
},
};