File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 44 */
55
66import { getUrlFromFilePath } from './utils/file-path/url/index.mjs'
7+ import allDocsPathsJson from '../app/api/docsPathsAllVersions.json' with { type : 'json' }
78
89const filePaths = process . argv . slice ( 2 )
910
@@ -13,7 +14,7 @@ main(filePaths)
1314function main ( filePaths ) {
1415 const result = filePaths . map ( ( filePath ) => {
1516 try {
16- return getUrlFromFilePath ( filePath )
17+ return getUrlFromFilePath ( filePath , allDocsPathsJson )
1718 } catch ( error ) {
1819 console . error ( error )
1920 }
Original file line number Diff line number Diff line change 66import { getProductDirectoryFromFilePath } from '../product-directory/index.mjs'
77import { getVersionFromFilePath } from '../version/index.mjs'
88import { PRODUCT_CONFIG } from '../../../../app/utils/productConfig.mjs'
9- import allDocsPathsJson from '../../../../app/api/docsPathsAllVersions.json' with { type : 'json' }
10-
119/**
1210 * Extracts the repo name from the file path,
1311 * then finds its respective url value from the docs paths
@@ -20,7 +18,7 @@ import allDocsPathsJson from '../../../../app/api/docsPathsAllVersions.json' wit
2018 */
2119export function getUrlFromFilePath (
2220 filePath ,
23- allDocsPaths = allDocsPathsJson ,
21+ allDocsPaths ,
2422 productConfig = PRODUCT_CONFIG ,
2523) {
2624 const repoDir = getProductDirectoryFromFilePath ( filePath )
You can’t perform that action at this time.
0 commit comments