Skip to content

Commit f52abbc

Browse files
committed
Simplified the lcoal dev process to only needing LOCAL_FILE_PATH
1 parent 02fefcf commit f52abbc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/remote-mdx-files.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function getRepoConfig(type = "docs") {
4949
}
5050

5151
function getDocsPath(type = "docs") {
52-
if (env.USE_LOCAL_FILES) {
52+
if (env.LOCAL_FILE_PATH) {
5353
const { folder: docsFolder } = getRepoConfig(type);
5454
return path.join(env.LOCAL_FILE_PATH, docsFolder);
5555
}
@@ -145,7 +145,7 @@ async function getLocalDocMeta(type, pathToFolder) {
145145
* @param {string} pathToFolder
146146
*/
147147
export async function getAllDocMeta(type, pathToFolder) {
148-
if (env.USE_LOCAL_FILES) {
148+
if (env.LOCAL_FILE_PATH) {
149149
return getLocalDocMeta(type, pathToFolder);
150150
}
151151

@@ -187,7 +187,7 @@ export async function getAllDocMeta(type, pathToFolder) {
187187
* @param {string} type
188188
*/
189189
export async function getDocsNav(type = "docs") {
190-
if (env.USE_LOCAL_FILES) {
190+
if (env.LOCAL_FILE_PATH) {
191191
const navPath = getDocsNavConfigUrl(type);
192192
const content = await fs.readFile(navPath, "utf8");
193193
return JSON.parse(content);
@@ -233,7 +233,7 @@ export function getDocUriFromPath(ghPath, type = "docs") {
233233
* @returns {Promise<string>}
234234
*/
235235
export async function getRawDocContent(url) {
236-
if (env.USE_LOCAL_FILES) {
236+
if (env.LOCAL_FILE_PATH) {
237237
try {
238238
return await fs.readFile(url, "utf8");
239239
} catch (error) {

0 commit comments

Comments
 (0)