mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 10:52:47 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
97
node_modules/ejs/ejs.js
generated
vendored
97
node_modules/ejs/ejs.js
generated
vendored
@@ -51,9 +51,9 @@ var fs = require('fs')
|
||||
, _VERSION_STRING = require('../package.json').version
|
||||
, _DEFAULT_DELIMITER = '%'
|
||||
, _DEFAULT_LOCALS_NAME = 'locals'
|
||||
, _REGEX_STRING = '(<%%|<%=|<%-|<%#|<%|%>|-%>)'
|
||||
, _REGEX_STRING = '(<%%|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)'
|
||||
, _OPTS = [ 'cache', 'filename', 'delimiter', 'scope', 'context'
|
||||
, 'debug', 'compileDebug', 'client', '_with'
|
||||
, 'debug', 'compileDebug', 'client', '_with', 'rmWhitespace'
|
||||
]
|
||||
, _TRAILING_SEMCOL = /;\s*$/
|
||||
, _BOM = /^\uFEFF/;
|
||||
@@ -420,6 +420,10 @@ Template.prototype = {
|
||||
this.templateText.replace(/\r/g, '').replace(/^\s+|\s+$/gm, '');
|
||||
}
|
||||
|
||||
// Slurp spaces and tabs before <%_ and after _%>
|
||||
this.templateText =
|
||||
this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
|
||||
|
||||
if (!this.source) {
|
||||
this.generateSource();
|
||||
prepended += ' var __output = [], __append = __output.push.bind(__output);' + '\n';
|
||||
@@ -512,7 +516,7 @@ Template.prototype = {
|
||||
if ( line.indexOf('<' + d) === 0 // If it is a tag
|
||||
&& line.indexOf('<' + d + d) !== 0) { // and is not escaped
|
||||
closing = matches[index + 2];
|
||||
if (!(closing == d + '>' || closing == '-' + d + '>')) {
|
||||
if (!(closing == d + '>' || closing == '-' + d + '>' || closing == '_' + d + '>')) {
|
||||
throw new Error('Could not find matching close tag for "' + line + '".');
|
||||
}
|
||||
}
|
||||
@@ -520,7 +524,7 @@ Template.prototype = {
|
||||
if ((include = line.match(/^\s*include\s+(\S+)/))) {
|
||||
opening = matches[index - 1];
|
||||
// Must be in EVAL or RAW mode
|
||||
if (opening && (opening == '<' + d || opening == '<' + d + '-')) {
|
||||
if (opening && (opening == '<' + d || opening == '<' + d + '-' || opening == '<' + d + '_')) {
|
||||
includeOpts = utils.shallowCopy({}, self.opts);
|
||||
includeSrc = includeSource(include[1], includeOpts);
|
||||
includeSrc = ' ; (function(){' + '\n' + includeSrc +
|
||||
@@ -603,6 +607,7 @@ Template.prototype = {
|
||||
|
||||
switch (line) {
|
||||
case '<' + d:
|
||||
case '<' + d + '_':
|
||||
this.mode = Template.modes.EVAL;
|
||||
break;
|
||||
case '<' + d + '=':
|
||||
@@ -620,12 +625,13 @@ Template.prototype = {
|
||||
break;
|
||||
case d + '>':
|
||||
case '-' + d + '>':
|
||||
case '_' + d + '>':
|
||||
if (this.mode == Template.modes.LITERAL) {
|
||||
_addOutput();
|
||||
}
|
||||
|
||||
this.mode = null;
|
||||
this.truncate = line.indexOf('-') === 0;
|
||||
this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
|
||||
break;
|
||||
default:
|
||||
// In script mode, depends on type of tag
|
||||
@@ -1094,69 +1100,39 @@ var substr = 'ab'.substr(-1) === 'b'
|
||||
// shim for using process in browser
|
||||
|
||||
var process = module.exports = {};
|
||||
var queue = [];
|
||||
var draining = false;
|
||||
|
||||
process.nextTick = (function () {
|
||||
var canSetImmediate = typeof window !== 'undefined'
|
||||
&& window.setImmediate;
|
||||
var canMutationObserver = typeof window !== 'undefined'
|
||||
&& window.MutationObserver;
|
||||
var canPost = typeof window !== 'undefined'
|
||||
&& window.postMessage && window.addEventListener
|
||||
;
|
||||
|
||||
if (canSetImmediate) {
|
||||
return function (f) { return window.setImmediate(f) };
|
||||
function drainQueue() {
|
||||
if (draining) {
|
||||
return;
|
||||
}
|
||||
|
||||
var queue = [];
|
||||
|
||||
if (canMutationObserver) {
|
||||
var hiddenDiv = document.createElement("div");
|
||||
var observer = new MutationObserver(function () {
|
||||
var queueList = queue.slice();
|
||||
queue.length = 0;
|
||||
queueList.forEach(function (fn) {
|
||||
fn();
|
||||
});
|
||||
});
|
||||
|
||||
observer.observe(hiddenDiv, { attributes: true });
|
||||
|
||||
return function nextTick(fn) {
|
||||
if (!queue.length) {
|
||||
hiddenDiv.setAttribute('yes', 'no');
|
||||
}
|
||||
queue.push(fn);
|
||||
};
|
||||
draining = true;
|
||||
var currentQueue;
|
||||
var len = queue.length;
|
||||
while(len) {
|
||||
currentQueue = queue;
|
||||
queue = [];
|
||||
var i = -1;
|
||||
while (++i < len) {
|
||||
currentQueue[i]();
|
||||
}
|
||||
len = queue.length;
|
||||
}
|
||||
|
||||
if (canPost) {
|
||||
window.addEventListener('message', function (ev) {
|
||||
var source = ev.source;
|
||||
if ((source === window || source === null) && ev.data === 'process-tick') {
|
||||
ev.stopPropagation();
|
||||
if (queue.length > 0) {
|
||||
var fn = queue.shift();
|
||||
fn();
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
|
||||
return function nextTick(fn) {
|
||||
queue.push(fn);
|
||||
window.postMessage('process-tick', '*');
|
||||
};
|
||||
draining = false;
|
||||
}
|
||||
process.nextTick = function (fun) {
|
||||
queue.push(fun);
|
||||
if (!draining) {
|
||||
setTimeout(drainQueue, 0);
|
||||
}
|
||||
|
||||
return function nextTick(fn) {
|
||||
setTimeout(fn, 0);
|
||||
};
|
||||
})();
|
||||
};
|
||||
|
||||
process.title = 'browser';
|
||||
process.browser = true;
|
||||
process.env = {};
|
||||
process.argv = [];
|
||||
process.version = ''; // empty string to avoid regexp issues
|
||||
|
||||
function noop() {}
|
||||
|
||||
@@ -1177,6 +1153,7 @@ process.cwd = function () { return '/' };
|
||||
process.chdir = function (dir) {
|
||||
throw new Error('process.chdir is not supported');
|
||||
};
|
||||
process.umask = function() { return 0; };
|
||||
|
||||
},{}],6:[function(require,module,exports){
|
||||
module.exports={
|
||||
@@ -1187,7 +1164,7 @@ module.exports={
|
||||
"engine",
|
||||
"ejs"
|
||||
],
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.3",
|
||||
"author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
|
||||
"contributors": [
|
||||
"Timothy Gu <timothygu99@gmail.com> (https://timothygu.github.io)"
|
||||
|
||||
Reference in New Issue
Block a user