mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-16 21:04:34 +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 { src } from '../config';
|
||||||
import { Route } from '../interfaces';
|
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
|
const routes: Route[] = files
|
||||||
.map((file: string) => {
|
.map((file: string) => {
|
||||||
if (/(^|\/|\\)_/.test(file)) return;
|
if (/(^|\/|\\)_/.test(file)) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user