noc-book-2/gatsby-node.js
2022-08-08 15:56:08 -04:00

16 lines
535 B
JavaScript

const fs = require('fs-extra');
const express = require(`express`);
exports.onCreateNode = require('./gatsby/on-create-node.js');
exports.createPages = require('./gatsby/create-pages.js');
exports.createResolvers = require('./gatsby/create-resolvers.js');
// Enable development support for serving HTML from `./static` folder
exports.onCreateDevServer = ({ app }) => {
app.use(express.static(`content`));
};
// Copy examples to the public folder
exports.onPostBuild = () => {
fs.copy('content/examples', 'public/examples/');
};