UNPKG

@westegg/gatsby-theme-core

Version:

`@westegg/gatsby-theme-core` has the core plugins and configuration used by other Gatsby Themes in [Westegg](https://westegg.xyz/).

21 lines (17 loc) 489 B
const fs = require("fs-extra") const path = require("path") /** * Check that the folders used by source-filesystem plugin exist. * If they do not, they will be created. */ exports.onPreBootstrap = ({ store, reporter }) => { const { program } = store.getState() const dirs = [ path.join(program.directory, "pages"), path.join(program.directory, "static/img") ] dirs.forEach(dir => { reporter.log(`ensure ${dir} directory present`) fs.ensureDirSync(dir) }) }