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

Function processFile

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

Source from the content-addressed store, hash-verified

57};
58
59export const processFile = (path: string) => {
60 if (realTime) {
61 if (isInfoFile(path)) {
62 parseInfoFile(path).then(async () => await updateBuildFiles());
63 } else if (isRouteFile(path)) {
64 checkRouteFile(path).then(async () => await updateBuildFiles());
65 }
66 } else {
67 if (isInfoFile(path)) {
68 fileMap[path] = false;
69 parseInfoFile(path).then(() => {
70 fileMap[path] = true;
71 checkForFinishedProcessing();
72 });
73 } else if (isRouteFile(path)) {
74 fileMap[path] = false;
75 checkRouteFile(path).then(() => {
76 fileMap[path] = true;
77 checkForFinishedProcessing();
78 });
79 }
80 }
81};
82
83export const finishedProcessing = () => {
84 allFilesProcessed = true;

Callers 1

build.tsFile · 0.90

Calls 6

parseInfoFileFunction · 0.90
updateBuildFilesFunction · 0.90
checkRouteFileFunction · 0.90
isInfoFileFunction · 0.85
isRouteFileFunction · 0.85

Tested by

no test coverage detected