move more stuff into site-kit

This commit is contained in:
Richard Harris
2019-04-28 22:52:56 -04:00
parent 63251c6733
commit 26bdd54484
8 changed files with 70 additions and 566 deletions

View File

@@ -1,11 +1,11 @@
import send from '@polka/send';
import get_sections from './_sections.js';
import generate_docs from '../../utils/generate_docs.js';
let json;
export function get(req, res) {
if (!json || process.env.NODE_ENV !== 'production') {
json = JSON.stringify(get_sections()); // TODO it errors if I send the non-stringified value
json = JSON.stringify(generate_docs('docs')); // TODO it errors if I send the non-stringified value
}
send(res, 200, json, {