UNPKG

noodl-loader

Version:

Loader for noodl applications

21 lines 784 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolvePath = exports.isPageInArray = void 0; const tslib_1 = require("tslib"); const path_1 = tslib_1.__importDefault(require("path")); function isPageInArray(preload, name) { if (!preload.length) return false; if (name.includes('_en')) name = name.replace('_en', ''); if (name.endsWith('.yml')) name = name.substring(0, '.yml'.length); name = name.trim(); return preload.some((str) => str.startsWith(name) || str.endsWith(name)); } exports.isPageInArray = isPageInArray; function resolvePath(...p) { return path_1.default.resolve(process.cwd(), ...p); } exports.resolvePath = resolvePath; //# sourceMappingURL=loader-utils.js.map