24 lines
635 B
JavaScript
24 lines
635 B
JavaScript
import { DEFAULT_SOURCE_BASE, DEFUALT_TARGET_BASE } from "../constants.js";
|
|
import { ENV } from "../env.js"
|
|
|
|
export const BasePaths = {
|
|
sourceRoot() {
|
|
const overridePath = ENV.getString(`VS_INPUT_DIR`);
|
|
|
|
return overridePath ?? DEFAULT_SOURCE_BASE;
|
|
},
|
|
targetRoot() {
|
|
const overridePath = ENV.getString(`VS_OUTPUT_DIR`);
|
|
|
|
return overridePath ?? DEFUALT_TARGET_BASE;
|
|
},
|
|
templates() {
|
|
return `${this.sourceRoot()}/templates`;
|
|
},
|
|
fragments() {
|
|
return `${this.sourceRoot()}/fragments`;
|
|
},
|
|
contentRoot() {
|
|
return `${this.sourceRoot()}/site`;
|
|
},
|
|
} |