Major Refactoring. Test update
This commit is contained in:
Vendored
+3
@@ -2,6 +2,7 @@ import { existsSync, readdirSync, statSync } from "fs";
|
||||
import grabDirNames from "./grab-dir-names";
|
||||
import path from "path";
|
||||
import AppNames from "./grab-app-names";
|
||||
import pagePathTransform from "./page-path-transform";
|
||||
export default function grabAllPages(params) {
|
||||
const { PAGES_DIR } = grabDirNames();
|
||||
const pages = grabPageDirRecursively({ page_dir: PAGES_DIR });
|
||||
@@ -56,8 +57,10 @@ function grabPageFileObject({ file_path, }) {
|
||||
let file_name = url_path.split("/").pop();
|
||||
if (!file_name)
|
||||
return;
|
||||
const transformed_path = pagePathTransform({ page_path: file_path });
|
||||
return {
|
||||
local_path: file_path,
|
||||
transformed_path,
|
||||
url_path,
|
||||
file_name,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user