We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95f2c30 commit 5c74b07Copy full SHA for 5c74b07
src/content-render/scripts/reusables-cli/shared.ts
@@ -100,14 +100,17 @@ export function resolveReusablePath(reusablePath: string): string {
100
}
101
102
103
+let paths: string[]
104
export function getAllReusablesFilePaths(): string[] {
- return filterFiles(
105
+ if (paths) return paths!
106
+ paths = filterFiles(
107
walk(reusablesDirectory, {
108
includeBasePath: true,
109
directories: false,
110
ignore: ['**/README.md', 'enterprise_deprecation/**'],
111
}),
112
)
113
+ return paths
114
115
116
export function findIndicesOfSubstringInString(substr: string, str: string): number[] {
0 commit comments