node 16 compat
This commit is contained in:
parent
affce4a4a1
commit
fb8dd537e0
1 changed files with 6 additions and 4 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import nunjucks from 'nunjucks';
|
||||
import jsdoc from '../doc.json' assert { type: 'json' };
|
||||
|
||||
// TODO: load tutorial.mdx and append rendered api.mdx to the bottom (to make sure TOC works)
|
||||
// TODO: split
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const jsdoc = JSON.parse(await readFile(`${__dirname}/../doc.json`, 'utf8'));
|
||||
// import jsdoc from '../doc.json' assert { type: 'json' }; // node 18
|
||||
|
||||
const env = nunjucks.configure('.', { autoescape: false });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue