UNPKG

accelerator-tool

Version:

The Accelerator devtool. Generally invoked with accelerator-tool, npx accelerator-tool, or xlr8r.

14 lines (12 loc) 303 B
import * as fs from 'fs-extra'; export async function makeStoryDirectory(directory) { try { await fs.mkdir(directory); } catch (err) { if (err.code === 'EEXIST') { throw new Error(`The directory, ${directory}, already exists.`); } else { throw err; } } }