mirror of
https://github.com/nature-of-code/noc-book-2
synced 2024-11-17 07:49:05 +01:00
16 lines
535 B
JavaScript
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/');
|
|
};
|