MCPcopy Create free account
hub / github.com/ProNextJS/declarative-routing / isRouteFile

Function isRouteFile

src/shared/watch.ts:44–57  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

42 return path.match(matcher);
43};
44const isRouteFile = (path: string) => {
45 const config = getConfig();
46 let matcher: RegExp;
47 switch (config.mode) {
48 case "qwikcity":
49 matcher = /index\.(js|jsx|ts|tsx)$/;
50 break;
51
52 default:
53 matcher = /(page|route)\.(js|jsx|ts|tsx)$/;
54 break;
55 }
56 return path.match(matcher);
57};
58
59export const processFile = (path: string) => {
60 if (realTime) {

Callers 1

processFileFunction · 0.85

Calls 1

getConfigFunction · 0.90

Tested by

no test coverage detected