miaoda-expo-devkit 0.1.1-beta.35 → 0.1.1-beta.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,13 +54,21 @@ function getRouterRoot(projectRoot) {
|
|
|
54
54
|
return ".";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
+
function hasLayoutFile(dir) {
|
|
58
|
+
for (const ext of ROUTE_EXTS) {
|
|
59
|
+
if (import_node_fs.default.existsSync(import_node_path.default.join(dir, `_layout${ext}`))) return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
57
63
|
function collectRoutesNeedingHide(layoutDir) {
|
|
58
64
|
const results = [];
|
|
59
65
|
function scan(dir) {
|
|
60
66
|
for (const entry of import_node_fs.default.readdirSync(dir, { withFileTypes: true })) {
|
|
61
67
|
const fullPath = import_node_path.default.join(dir, entry.name);
|
|
62
68
|
if (entry.isDirectory()) {
|
|
63
|
-
|
|
69
|
+
if (!hasLayoutFile(fullPath)) {
|
|
70
|
+
scan(fullPath);
|
|
71
|
+
}
|
|
64
72
|
continue;
|
|
65
73
|
}
|
|
66
74
|
if (!entry.isFile()) continue;
|