From ce08c45456db88aad9ccdc19809e5599a88902f4 Mon Sep 17 00:00:00 2001 From: Jakob Linskeseder Date: Sat, 14 Apr 2018 19:13:56 +0200 Subject: [PATCH] Allow index.md files as index pages Until now, only `README.md` files got treated as a directory index. This commit also allows `index.md` to be used as index files. --- lib/prepare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prepare.js b/lib/prepare.js index cf767937b1..77a488f2b4 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -189,7 +189,7 @@ async function genComponentRegistrationFile ({ sourceDir }) { return `import Vue from 'vue'\n` + components.map(genImport).join('\n') } -const indexRE = /\breadme\.md$/i +const indexRE = /\b(index|readme)\.md$/i const extRE = /\.(vue|md)$/ function fileToPath (file) {