mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
allow server routes to be .ts files (or anything else) - fixes #57
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user