1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-21 06:31:28 +02:00

Nodejs 13 compat and eslint/prettier glob fix (#3149)

This commit is contained in:
DamareYoh
2019-11-28 14:32:26 -08:00
committed by Ian Storm Taylor
parent 6608a5df39
commit 4bbbfba142
5 changed files with 3 additions and 3 deletions

View File

@@ -1,23 +0,0 @@
const fs = require('fs')
const path = require('path')
module.exports = {
exportPathMap: async (defaultPathMap, config) => {
const { dir } = config
const examples = fs.readdirSync(path.resolve(dir, 'examples'))
const pages = {
'/': { page: '/' },
}
for (const file of examples) {
if (!file.endsWith('.js')) {
continue
}
const example = file.replace('.js', '')
pages[`/examples/${example}`] = { page: '/examples/[example]', example }
}
return pages
},
}