Merge branch 'master' into collision

This commit is contained in:
Rich Harris
2018-05-04 17:05:18 -04:00
committed by GitHub
21 changed files with 105 additions and 49 deletions

View File

@@ -7,6 +7,8 @@ export default function create_routes({ files } = { files: glob.sync('**/*.*', {
const routes: Route[] = files
.filter((file: string) => !/(^|\/|\\)_/.test(file))
.map((file: string) => {
if (/(^|\/|\\)(_|\.(?!well-known))/.test(file)) return;
if (/]\[/.test(file)) {
throw new Error(`Invalid route ${file} — parameters must be separated`);
}