@tramvai/experiments 1.72.1 → 1.72.2
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/lib/fileSystemPages.d.ts +5 -0
- package/lib/index.es.js +8 -1
- package/lib/index.js +8 -0
- package/package.json +2 -2
package/lib/fileSystemPages.d.ts
CHANGED
|
@@ -21,3 +21,8 @@ export declare const staticFileSystemPageToPath: (pageComponent: string) => stri
|
|
|
21
21
|
export declare const pathToExternalFileSystemPage: (path: string) => string;
|
|
22
22
|
export declare const fileSystemPageToRoute: (pageComponent: string) => Route;
|
|
23
23
|
export declare const fileSystemPageComponentExists: (pageComponent: string) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @example
|
|
26
|
+
* @/routes/index to @_routes_index
|
|
27
|
+
*/
|
|
28
|
+
export declare const fileSystemPageToWebpackChunkName: (pageComponent: string) => string;
|
package/lib/index.es.js
CHANGED
|
@@ -64,5 +64,12 @@ const fileSystemPageToRoute = (pageComponent) => {
|
|
|
64
64
|
const fileSystemPageComponentExists = (pageComponent) => {
|
|
65
65
|
return !!(getStaticFileSystemPages()[pageComponent] || getExternalFileSystemPages()[pageComponent]);
|
|
66
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* @example
|
|
69
|
+
* @/routes/index to @_routes_index
|
|
70
|
+
*/
|
|
71
|
+
const fileSystemPageToWebpackChunkName = (pageComponent) => {
|
|
72
|
+
return pageComponent.replace(/\//g, '_');
|
|
73
|
+
};
|
|
67
74
|
|
|
68
|
-
export { FILE_SYSTEM_PAGES_PREFIX, fileSystemPageComponentExists, fileSystemPageToRoute, fileSystemPagesEnabled, getAllFileSystemPages, getExternalFileSystemPages, getStaticFileSystemPages, isFileSystemPageComponent, pathToExternalFileSystemPage, staticFileSystemPageToPath };
|
|
75
|
+
export { FILE_SYSTEM_PAGES_PREFIX, fileSystemPageComponentExists, fileSystemPageToRoute, fileSystemPageToWebpackChunkName, fileSystemPagesEnabled, getAllFileSystemPages, getExternalFileSystemPages, getStaticFileSystemPages, isFileSystemPageComponent, pathToExternalFileSystemPage, staticFileSystemPageToPath };
|
package/lib/index.js
CHANGED
|
@@ -72,10 +72,18 @@ const fileSystemPageToRoute = (pageComponent) => {
|
|
|
72
72
|
const fileSystemPageComponentExists = (pageComponent) => {
|
|
73
73
|
return !!(getStaticFileSystemPages()[pageComponent] || getExternalFileSystemPages()[pageComponent]);
|
|
74
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* @example
|
|
77
|
+
* @/routes/index to @_routes_index
|
|
78
|
+
*/
|
|
79
|
+
const fileSystemPageToWebpackChunkName = (pageComponent) => {
|
|
80
|
+
return pageComponent.replace(/\//g, '_');
|
|
81
|
+
};
|
|
75
82
|
|
|
76
83
|
exports.FILE_SYSTEM_PAGES_PREFIX = FILE_SYSTEM_PAGES_PREFIX;
|
|
77
84
|
exports.fileSystemPageComponentExists = fileSystemPageComponentExists;
|
|
78
85
|
exports.fileSystemPageToRoute = fileSystemPageToRoute;
|
|
86
|
+
exports.fileSystemPageToWebpackChunkName = fileSystemPageToWebpackChunkName;
|
|
79
87
|
exports.fileSystemPagesEnabled = fileSystemPagesEnabled;
|
|
80
88
|
exports.getAllFileSystemPages = getAllFileSystemPages;
|
|
81
89
|
exports.getExternalFileSystemPages = getExternalFileSystemPages;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/experiments",
|
|
3
|
-
"version": "1.72.
|
|
3
|
+
"version": "1.72.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@tinkoff/router": "0.1.70",
|
|
24
|
-
"@tramvai/cli": "1.72.
|
|
24
|
+
"@tramvai/cli": "1.72.2",
|
|
25
25
|
"tslib": "^2.0.3"
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0"
|