md-toy-blog
Version:
Very simple Markdown blog: serves your md as html without fancy databases. You will only spend time writing the actual data.
50 lines (49 loc) • 3.14 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var appConfig_1 = __importDefault(require("../config/appConfig"));
var loadDictElement = {
factory: function (_a) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
var u = _a.userCustomConfig, defaultConfig = __rest(_a, ["userCustomConfig"]);
return __assign({ compiledUserContentDir: (_b = u.compiledUserContentDir) !== null && _b !== void 0 ? _b : defaultConfig.compiledUserContentDir, missingRefValueReplacement: (_c = u.missingRefValueReplacement) !== null && _c !== void 0 ? _c : defaultConfig.missingRefValueReplacement, mdBlogPostsDir: (_d = u.mdBlogPostsDir) !== null && _d !== void 0 ? _d : defaultConfig.mdBlogPostsDir, packageName: (_e = u.packageName) !== null && _e !== void 0 ? _e : defaultConfig.packageName, previewLength: (_f = u.previewLength) !== null && _f !== void 0 ? _f : defaultConfig.previewLength, staticFilesDir: (_g = u.staticFilesDir) !== null && _g !== void 0 ? _g : defaultConfig.staticFilesDir, pagesDir: (_h = u.pagesDir) !== null && _h !== void 0 ? _h : defaultConfig.pagesDir, viewTemplatesDir: (_j = u.viewTemplatesDir) !== null && _j !== void 0 ? _j : defaultConfig.viewTemplatesDir, userCustomConfigPath: (_k = u.userCustomConfigPath) !== null && _k !== void 0 ? _k : defaultConfig.userCustomConfigPath, userProjectRootDir: (_l = u.userProjectRootDir) !== null && _l !== void 0 ? _l : defaultConfig.userProjectRootDir }, appConfig_1.default);
},
locateDeps: {
compiledUserContentDir: 'MTB_COMPILED_USER_CONTENT_DIR',
missingRefValueReplacement: 'MTB_MISSING_REF_VALUE_REPLACEMENT',
mdBlogPostsDir: 'MTB_MD_BLOG_POSTS_DIR',
packageName: 'MTB_PACKAGE_NAME',
previewLength: 'MTB_POST_PREVIEW_LENGTH',
staticFilesDir: 'MTB_STATIC_FILES_DIR',
pagesDir: 'MTB_PAGES_DIR',
viewTemplatesDir: 'MTB_VIEW_TEMPLATES_DIR',
userCustomConfigPath: 'MTB_USER_CUSTOM_CONFIG_PATH',
userProjectRootDir: 'MTB_USER_PROJECT_ROOT_DIR',
userCustomConfig: 'userCustomConfig',
}
};
exports.default = loadDictElement;