From 6f9ce9ce857562d804268be1a7b57474429a86d7 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Thu, 19 Apr 2018 22:04:03 +0900 Subject: [PATCH] Accept directory entries which starts with dot as routes It allows to implement .well-known URIs. --- src/core/create_routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/create_routes.ts b/src/core/create_routes.ts index 3888b87..80ff50f 100644 --- a/src/core/create_routes.ts +++ b/src/core/create_routes.ts @@ -3,7 +3,7 @@ import glob from 'glob'; import { locations } from '../config'; import { Route } from '../interfaces'; -export default function create_routes({ files } = { files: glob.sync('**/*.*', { cwd: locations.routes(), nodir: true }) }) { +export default function create_routes({ files } = { files: glob.sync('**/*.*', { cwd: locations.routes(), dot: true, nodir: true }) }) { const routes: Route[] = files .map((file: string) => { if (/(^|\/|\\)_/.test(file)) return;