Improve quadrant pages

This commit is contained in:
Tom Raithel
2017-01-24 22:30:11 +01:00
parent 0252c9e112
commit cc492e5438
9 changed files with 66 additions and 15 deletions

View File

@@ -7,6 +7,9 @@ import {
distPath,
getAllPugFiles,
} from './file';
import {
vars,
} from './template';
export const createStatic = async (radar) => {
const paths = await getAllPugFiles(staticPath());
@@ -25,9 +28,9 @@ const getPlainFileNames = (paths) => (
const renderStaticPages = (radar, fileNames) => (
Promise.all(fileNames.map((name) => (
new Promise((resolve, reject) => (
outputFile(distPath(`${name}.html`), pug.renderFile(staticPath(`${name}.pug`), {
outputFile(distPath(`${name}.html`), pug.renderFile(staticPath(`${name}.pug`), vars({
radar,
}), (err, data) => {
})), (err, data) => {
if (err) {
reject(err);
} else {