allow server routes to be .ts files (or anything else) - fixes #57

This commit is contained in:
Rich Harris
2018-03-10 20:08:23 -05:00
parent c827fda703
commit 9bac32eea4

View File

@@ -3,7 +3,7 @@ import glob from 'glob';
import { src } from '../config';
import { Route } from '../interfaces';
export default function create_routes({ files } = { files: glob.sync('**/*.+(html|js|mjs)', { cwd: src() }) }) {
export default function create_routes({ files } = { files: glob.sync('**/*.*', { cwd: src() }) }) {
const routes: Route[] = files
.map((file: string) => {
if (/(^|\/|\\)_/.test(file)) return;