Update geotiff

This commit is contained in:
Andreas Hocevar
2021-09-23 12:21:38 +00:00
parent 2ebbee2340
commit c934f08866
5 changed files with 51 additions and 40 deletions

View File

@@ -1,5 +1,6 @@
import assert from 'assert';
import frontMatter from 'front-matter';
import fs from 'fs';
import fse from 'fs-extra';
import handlebars from 'handlebars';
import marked from 'marked';
@@ -17,6 +18,11 @@ const isTemplateJs =
/\/(jquery(-\d+\.\d+\.\d+)?|(bootstrap(\.bundle)?))(\.min)?\.js(\?.*)?$/;
const isTemplateCss = /\/bootstrap(\.min)?\.css(\?.*)?$/;
const exampleDirContents = fs
.readdirSync(path.join(baseDir, '..'))
.filter((name) => /^(?!index).*\.html$/.test(name))
.map((name) => name.replace(/\.html$/, ''));
let cachedPackageInfo = null;
async function getPackageInfo() {
if (cachedPackageInfo) {
@@ -188,7 +194,7 @@ export default class ExampleBuilder {
}
const name = filename.replace(/\.js$/, '');
if (name === 'index' || name === this.common) {
if (!exampleDirContents.includes(name)) {
continue;
}