@arc-js/core 0.0.51 → 0.0.52
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.
- package/minimal-config.js +3 -2
- package/package.json +1 -1
- package/routes-utils.js +6 -4
package/minimal-config.js
CHANGED
|
@@ -28,10 +28,11 @@ function normalizePath(path) {
|
|
|
28
28
|
return path.replace(/\/+/g, '/').replace(/\/$/, '');
|
|
29
29
|
}
|
|
30
30
|
function getConfigModules(srcPath = getSrcPath()) {
|
|
31
|
-
|
|
31
|
+
const allPatterns = [
|
|
32
32
|
`${srcPath}/config.json`,
|
|
33
33
|
`${srcPath}/modules/**/config.json`
|
|
34
|
-
]
|
|
34
|
+
];
|
|
35
|
+
return import.meta.glob(allPatterns);
|
|
35
36
|
}
|
|
36
37
|
function cleanPathConfig(filePath, srcPath = getSrcPath()) {
|
|
37
38
|
return filePath
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.52",
|
|
7
7
|
"description": "CORE est un module de routage intelligent et auto-configuré pour les applications React avec TypeScript/Javascript. Il fournit un système de routage basé sur la structure de fichiers, des hooks de navigation avancés et une configuration minimale pour les applications modulaires.",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"keywords": [],
|
package/routes-utils.js
CHANGED
|
@@ -25,10 +25,11 @@ function getSrcPath() {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
function getConfigModules(srcPath = getSrcPath()) {
|
|
28
|
-
|
|
28
|
+
const allPatterns = [
|
|
29
29
|
`${srcPath}/config.json`,
|
|
30
30
|
`${srcPath}/modules/**/config.json`
|
|
31
|
-
]
|
|
31
|
+
];
|
|
32
|
+
return import.meta.glob(allPatterns);
|
|
32
33
|
}
|
|
33
34
|
function cleanPathConfig(filePath, srcPath = getSrcPath()) {
|
|
34
35
|
return filePath
|
|
@@ -112,10 +113,11 @@ const indexPageName = 'index';
|
|
|
112
113
|
const indexPageRule = /\/index$/;
|
|
113
114
|
const indexPagePath = '/';
|
|
114
115
|
function getPageModules(srcPath = getSrcPath()) {
|
|
115
|
-
|
|
116
|
+
const allPatterns = [
|
|
116
117
|
`${srcPath}/pages/**/*.tsx`,
|
|
117
118
|
`${srcPath}/modules/**/pages/**/*.tsx`
|
|
118
|
-
]
|
|
119
|
+
];
|
|
120
|
+
return import.meta.glob(allPatterns);
|
|
119
121
|
}
|
|
120
122
|
function cleanPathPage(filePath, srcPath = getSrcPath()) {
|
|
121
123
|
return filePath
|