1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

12
node_modules/d/.lint generated vendored Normal file
View File

@@ -0,0 +1,12 @@
@root
es5
module
tabs
indent 2
maxlen 80
ass
nomen
plusplus

4
node_modules/d/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,4 @@
.DS_Store
/node_modules
/npm-debug.log
/.lintcache

9
node_modules/d/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,9 @@
language: node_js
node_js:
- 0.8
- 0.10
- 0.11
notifications:
email:
- medikoo+d@medikoo.com

7
node_modules/d/CHANGES generated vendored Normal file
View File

@@ -0,0 +1,7 @@
v0.1.1 -- 2014.04.24
- Add `autoBind` and `lazy` utilities
- Allow to pass other options to be merged onto created descriptor.
Useful when used with other custom utilties
v0.1.0 -- 2013.06.20
Initial (derived from es5-ext project)

19
node_modules/d/LICENCE generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (C) 2013 Mariusz Nowak (www.medikoo.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

108
node_modules/d/README.md generated vendored Normal file
View File

@@ -0,0 +1,108 @@
# D - Property descriptor factory
_Originally derived from [es5-ext](https://github.com/medikoo/es5-ext) package._
Defining properties with descriptors is very verbose:
```javascript
var Account = function () {};
Object.defineProperties(Account.prototype, {
deposit: { value: function () {
/* ... */
}, configurable: true, enumerable: false, writable: true },
whithdraw: { value: function () {
/* ... */
}, configurable: true, enumerable: false, writable: true },
balance: { get: function () {
/* ... */
}, configurable: true, enumerable: false }
});
```
D cuts that to:
```javascript
var d = require('d');
var Account = function () {};
Object.defineProperties(Account.prototype, {
deposit: d(function () {
/* ... */
}),
whithdraw: d(function () {
/* ... */
}),
balance: d.gs(function () {
/* ... */
})
});
```
By default, created descriptor follow characteristics of native ES5 properties, and defines values as:
```javascript
{ configurable: true, enumerable: false, writable: true }
```
You can overwrite it by preceding _value_ argument with instruction:
```javascript
d('c', value); // { configurable: true, enumerable: false, writable: false }
d('ce', value); // { configurable: true, enumerable: true, writable: false }
d('e', value); // { configurable: false, enumerable: true, writable: false }
// Same way for get/set:
d.gs('e', value); // { configurable: false, enumerable: true }
```
### Other utilities
#### autoBind(obj, props) _(d/auto-bind)_
Define methods which will be automatically bound to its instances
```javascript
var d = require('d');
var autoBind = require('d/auto-bind');
var Foo = function () { this._count = 0; };
autoBind(Foo.prototype, {
increment: d(function () { ++this._count; });
});
var foo = new Foo();
// Increment foo counter on each domEl click
domEl.addEventListener('click', foo.increment, false);
```
#### lazy(obj, props) _(d/lazy)_
Define lazy properties, which will be resolved on first access
```javascript
var d = require('d');
var lazy = require('d/lazy');
var Foo = function () {};
lazy(Foo.prototype, {
items: d(function () { return []; })
});
var foo = new Foo();
foo.items.push(1, 2); // foo.items array created
```
## Installation
### NPM
In your project path:
$ npm install d
### Browser
You can easily bundle _D_ for browser with [modules-webmake](https://github.com/medikoo/modules-webmake)
## Tests [![Build Status](https://travis-ci.org/medikoo/d.png)](https://travis-ci.org/medikoo/d)
$ npm test

31
node_modules/d/auto-bind.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
'use strict';
var copy = require('es5-ext/object/copy')
, map = require('es5-ext/object/map')
, callable = require('es5-ext/object/valid-callable')
, validValue = require('es5-ext/object/valid-value')
, bind = Function.prototype.bind, defineProperty = Object.defineProperty
, hasOwnProperty = Object.prototype.hasOwnProperty
, define;
define = function (name, desc, bindTo) {
var value = validValue(desc) && callable(desc.value), dgs;
dgs = copy(desc);
delete dgs.writable;
delete dgs.value;
dgs.get = function () {
if (hasOwnProperty.call(this, name)) return value;
desc.value = bind.call(value, (bindTo == null) ? this : this[bindTo]);
defineProperty(this, name, desc);
return this[name];
};
return dgs;
};
module.exports = function (props/*, bindTo*/) {
var bindTo = arguments[1];
return map(props, function (desc, name) {
return define(name, desc, bindTo);
});
};

63
node_modules/d/index.js generated vendored Normal file
View File

@@ -0,0 +1,63 @@
'use strict';
var assign = require('es5-ext/object/assign')
, normalizeOpts = require('es5-ext/object/normalize-options')
, isCallable = require('es5-ext/object/is-callable')
, contains = require('es5-ext/string/#/contains')
, d;
d = module.exports = function (dscr, value/*, options*/) {
var c, e, w, options, desc;
if ((arguments.length < 2) || (typeof dscr !== 'string')) {
options = value;
value = dscr;
dscr = null;
} else {
options = arguments[2];
}
if (dscr == null) {
c = w = true;
e = false;
} else {
c = contains.call(dscr, 'c');
e = contains.call(dscr, 'e');
w = contains.call(dscr, 'w');
}
desc = { value: value, configurable: c, enumerable: e, writable: w };
return !options ? desc : assign(normalizeOpts(options), desc);
};
d.gs = function (dscr, get, set/*, options*/) {
var c, e, options, desc;
if (typeof dscr !== 'string') {
options = set;
set = get;
get = dscr;
dscr = null;
} else {
options = arguments[3];
}
if (get == null) {
get = undefined;
} else if (!isCallable(get)) {
options = get;
get = set = undefined;
} else if (set == null) {
set = undefined;
} else if (!isCallable(set)) {
options = set;
set = undefined;
}
if (dscr == null) {
c = true;
e = false;
} else {
c = contains.call(dscr, 'c');
e = contains.call(dscr, 'e');
}
desc = { get: get, set: set, configurable: c, enumerable: e };
return !options ? desc : assign(normalizeOpts(options), desc);
};

111
node_modules/d/lazy.js generated vendored Normal file
View File

@@ -0,0 +1,111 @@
'use strict';
var map = require('es5-ext/object/map')
, isCallable = require('es5-ext/object/is-callable')
, validValue = require('es5-ext/object/valid-value')
, contains = require('es5-ext/string/#/contains')
, call = Function.prototype.call
, defineProperty = Object.defineProperty
, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor
, getPrototypeOf = Object.getPrototypeOf
, hasOwnProperty = Object.prototype.hasOwnProperty
, cacheDesc = { configurable: false, enumerable: false, writable: false,
value: null }
, define;
define = function (name, options) {
var value, dgs, cacheName, desc, writable = false, resolvable
, flat;
options = Object(validValue(options));
cacheName = options.cacheName;
flat = options.flat;
if (cacheName == null) cacheName = name;
delete options.cacheName;
value = options.value;
resolvable = isCallable(value);
delete options.value;
dgs = { configurable: Boolean(options.configurable),
enumerable: Boolean(options.enumerable) };
if (name !== cacheName) {
dgs.get = function () {
if (hasOwnProperty.call(this, cacheName)) return this[cacheName];
cacheDesc.value = resolvable ? call.call(value, this, options) : value;
cacheDesc.writable = writable;
defineProperty(this, cacheName, cacheDesc);
cacheDesc.value = null;
if (desc) defineProperty(this, name, desc);
return this[cacheName];
};
} else if (!flat) {
dgs.get = function self() {
var ownDesc;
if (hasOwnProperty.call(this, name)) {
ownDesc = getOwnPropertyDescriptor(this, name);
// It happens in Safari, that getter is still called after property
// was defined with a value, following workarounds that
if (ownDesc.hasOwnProperty('value')) return ownDesc.value;
if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) {
return ownDesc.get.call(this);
}
return value;
}
desc.value = resolvable ? call.call(value, this, options) : value;
defineProperty(this, name, desc);
desc.value = null;
return this[name];
};
} else {
dgs.get = function self() {
var base = this, ownDesc;
if (hasOwnProperty.call(this, name)) {
// It happens in Safari, that getter is still called after property
// was defined with a value, following workarounds that
ownDesc = getOwnPropertyDescriptor(this, name);
if (ownDesc.hasOwnProperty('value')) return ownDesc.value;
if ((typeof ownDesc.get === 'function') && (ownDesc.get !== self)) {
return ownDesc.get.call(this);
}
}
while (!hasOwnProperty.call(base, name)) base = getPrototypeOf(base);
desc.value = resolvable ? call.call(value, base, options) : value;
defineProperty(base, name, desc);
desc.value = null;
return base[name];
};
}
dgs.set = function (value) {
dgs.get.call(this);
this[cacheName] = value;
};
if (options.desc) {
desc = {
configurable: contains.call(options.desc, 'c'),
enumerable: contains.call(options.desc, 'e')
};
if (cacheName === name) {
desc.writable = contains.call(options.desc, 'w');
desc.value = null;
} else {
writable = contains.call(options.desc, 'w');
desc.get = dgs.get;
desc.set = dgs.set;
}
delete options.desc;
} else if (cacheName === name) {
desc = {
configurable: Boolean(options.configurable),
enumerable: Boolean(options.enumerable),
writable: Boolean(options.writable),
value: null
};
}
delete options.configurable;
delete options.enumerable;
delete options.writable;
return dgs;
};
module.exports = function (props) {
return map(props, function (desc, name) { return define(name, desc); });
};

91
node_modules/d/package.json generated vendored Normal file
View File

@@ -0,0 +1,91 @@
{
"_args": [
[
"d@^0.1.1",
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/cli-color"
]
],
"_from": "d@>=0.1.1 <0.2.0",
"_id": "d@0.1.1",
"_inCache": true,
"_installable": true,
"_location": "/d",
"_npmUser": {
"email": "medikoo+npm@medikoo.com",
"name": "medikoo"
},
"_npmVersion": "1.4.3",
"_phantomChildren": {},
"_requested": {
"name": "d",
"raw": "d@^0.1.1",
"rawSpec": "^0.1.1",
"scope": null,
"spec": ">=0.1.1 <0.2.0",
"type": "range"
},
"_requiredBy": [
"/cli-color",
"/es6-iterator",
"/es6-symbol",
"/es6-weak-map",
"/es6-weak-map/es6-iterator",
"/es6-weak-map/es6-symbol",
"/event-emitter",
"/memoizee"
],
"_resolved": "https://registry.npmjs.org/d/-/d-0.1.1.tgz",
"_shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
"_shrinkwrap": null,
"_spec": "d@^0.1.1",
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/cli-color",
"author": {
"email": "medyk@medikoo.com",
"name": "Mariusz Nowak",
"url": "http://www.medikoo.com/"
},
"bugs": {
"url": "https://github.com/medikoo/d/issues"
},
"dependencies": {
"es5-ext": "~0.10.2"
},
"description": "Property descriptor factory",
"devDependencies": {
"tad": "~0.1.21"
},
"directories": {},
"dist": {
"shasum": "da184c535d18d8ee7ba2aa229b914009fae11309",
"tarball": "http://registry.npmjs.org/d/-/d-0.1.1.tgz"
},
"homepage": "https://github.com/medikoo/d",
"keywords": [
"descriptor",
"descriptors",
"ecma",
"ecmascript",
"es",
"meta",
"properties",
"property"
],
"license": "MIT",
"maintainers": [
{
"name": "medikoo",
"email": "medikoo+npm@medikoo.com"
}
],
"name": "d",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/medikoo/d.git"
},
"scripts": {
"test": "node node_modules/tad/bin/tad"
},
"version": "0.1.1"
}

12
node_modules/d/test/auto-bind.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
var d = require('../');
module.exports = function (t, a) {
var o = Object.defineProperties({}, t({
bar: d(function () { return this === o; }),
bar2: d(function () { return this; })
}));
a.deep([(o.bar)(), (o.bar2)()], [true, o]);
};

182
node_modules/d/test/index.js generated vendored Normal file
View File

@@ -0,0 +1,182 @@
'use strict';
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
module.exports = function (t, a) {
var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg
, dfs;
o = Object.create(Object.prototype, {
c: t('c', c = {}),
cgs: t.gs('c', cg = function () {}, cs = function () {}),
ce: t('ce', ce = {}),
cegs: t.gs('ce', ceg = function () {}, ces = function () {}),
cew: t('cew', cew = {}),
cw: t('cw', cw = {}),
e: t('e', e = {}),
egs: t.gs('e', eg = function () {}, es = function () {}),
ew: t('ew', ew = {}),
v: t('', v = {}),
vgs: t.gs('', vg = function () {}, vs = function () {}),
w: t('w', w = {}),
df: t(df = {}),
dfgs: t.gs(dfg = function () {}, dfs = function () {})
});
return {
c: function (a) {
var d = getOwnPropertyDescriptor(o, 'c');
a(d.value, c, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, 'cgs');
a(d.value, undefined, "GS Value");
a(d.get, cg, "GS Get");
a(d.set, cs, "GS Set");
a(d.configurable, true, "GS Configurable");
a(d.enumerable, false, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
ce: function (a) {
var d = getOwnPropertyDescriptor(o, 'ce');
a(d.value, ce, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, 'cegs');
a(d.value, undefined, "GS Value");
a(d.get, ceg, "GS Get");
a(d.set, ces, "GS Set");
a(d.configurable, true, "GS Configurable");
a(d.enumerable, true, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
cew: function (a) {
var d = getOwnPropertyDescriptor(o, 'cew');
a(d.value, cew, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, true, "Writable");
},
cw: function (a) {
var d = getOwnPropertyDescriptor(o, 'cw');
a(d.value, cw, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, true, "Writable");
},
e: function (a) {
var d = getOwnPropertyDescriptor(o, 'e');
a(d.value, e, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, 'egs');
a(d.value, undefined, "GS Value");
a(d.get, eg, "GS Get");
a(d.set, es, "GS Set");
a(d.configurable, false, "GS Configurable");
a(d.enumerable, true, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
ew: function (a) {
var d = getOwnPropertyDescriptor(o, 'ew');
a(d.value, ew, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, true, "Writable");
},
v: function (a) {
var d = getOwnPropertyDescriptor(o, 'v');
a(d.value, v, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, 'vgs');
a(d.value, undefined, "GS Value");
a(d.get, vg, "GS Get");
a(d.set, vs, "GS Set");
a(d.configurable, false, "GS Configurable");
a(d.enumerable, false, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
w: function (a) {
var d = getOwnPropertyDescriptor(o, 'w');
a(d.value, w, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, true, "Writable");
},
d: function (a) {
var d = getOwnPropertyDescriptor(o, 'df');
a(d.value, df, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, true, "Writable");
d = getOwnPropertyDescriptor(o, 'dfgs');
a(d.value, undefined, "GS Value");
a(d.get, dfg, "GS Get");
a(d.set, dfs, "GS Set");
a(d.configurable, true, "GS Configurable");
a(d.enumerable, false, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
Options: {
v: function (a) {
var x = {}, d = t(x, { foo: true });
a.deep(d, { configurable: true, enumerable: false, writable: true,
value: x, foo: true }, "No descriptor");
d = t('c', 'foo', { marko: 'elo' });
a.deep(d, { configurable: true, enumerable: false, writable: false,
value: 'foo', marko: 'elo' }, "Descriptor");
},
gs: function (a) {
var gFn = function () {}, sFn = function () {}, d;
d = t.gs(gFn, sFn, { foo: true });
a.deep(d, { configurable: true, enumerable: false, get: gFn, set: sFn,
foo: true }, "No descriptor");
d = t.gs(null, sFn, { foo: true });
a.deep(d, { configurable: true, enumerable: false, get: undefined,
set: sFn, foo: true }, "No descriptor: Just set");
d = t.gs(gFn, { foo: true });
a.deep(d, { configurable: true, enumerable: false, get: gFn,
set: undefined, foo: true }, "No descriptor: Just get");
d = t.gs('e', gFn, sFn, { bar: true });
a.deep(d, { configurable: false, enumerable: true, get: gFn, set: sFn,
bar: true }, "Descriptor");
d = t.gs('e', null, sFn, { bar: true });
a.deep(d, { configurable: false, enumerable: true, get: undefined,
set: sFn, bar: true }, "Descriptor: Just set");
d = t.gs('e', gFn, { bar: true });
a.deep(d, { configurable: false, enumerable: true, get: gFn,
set: undefined, bar: true }, "Descriptor: Just get");
}
}
};
};

77
node_modules/d/test/lazy.js generated vendored Normal file
View File

@@ -0,0 +1,77 @@
'use strict';
var d = require('../')
, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
module.exports = function (t, a) {
var Foo = function () {}, i = 1, o, o2, desc;
Object.defineProperties(Foo.prototype, t({
bar: d(function () { return ++i; }),
bar2: d(function () { return this.bar + 23; }),
bar3: d(function () { return this.bar2 + 34; }, { desc: 'ew' }),
bar4: d(function () { return this.bar3 + 12; }, { cacheName: '_bar4_' }),
bar5: d(function () { return this.bar4 + 3; },
{ cacheName: '_bar5_', desc: 'e' })
}));
desc = getOwnPropertyDescriptor(Foo.prototype, 'bar');
a(desc.configurable, true, "Configurable: default");
a(desc.enumerable, false, "Enumerable: default");
o = new Foo();
a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74],
"Values");
a.deep(getOwnPropertyDescriptor(o, 'bar3'), { configurable: false,
enumerable: true, writable: true, value: 59 }, "Desc");
a(o.hasOwnProperty('bar4'), false, "Cache not exposed");
desc = getOwnPropertyDescriptor(o, 'bar5');
a.deep(desc, { configurable: false,
enumerable: true, get: desc.get, set: desc.set }, "Cache & Desc: desc");
o2 = Object.create(o);
o2.bar = 30;
o2.bar3 = 100;
a.deep([o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115],
"Extension Values");
Foo = function () {};
Object.defineProperties(Foo.prototype, t({
test: d('w', function () { return 'raz'; }),
test2: d('', function () { return 'raz'; }, { desc: 'w' }),
test3: d('', function () { return 'raz'; },
{ cacheName: '__test3__', desc: 'w' }),
test4: d('w', 'bar')
}));
o = new Foo();
o.test = 'marko';
a.deep(getOwnPropertyDescriptor(o, 'test'),
{ configurable: false, enumerable: false, writable: true, value: 'marko' },
"Set before get");
o.test2 = 'marko2';
a.deep(getOwnPropertyDescriptor(o, 'test2'),
{ configurable: false, enumerable: false, writable: true, value: 'marko2' },
"Set before get: Custom desc");
o.test3 = 'marko3';
a.deep(getOwnPropertyDescriptor(o, '__test3__'),
{ configurable: false, enumerable: false, writable: true, value: 'marko3' },
"Set before get: Custom cache name");
a(o.test4, 'bar', "Resolve by value");
a.h1("Flat");
Object.defineProperties(Foo.prototype, t({
flat: d(function () { return 'foo'; }, { flat: true }),
flat2: d(function () { return 'bar'; }, { flat: true })
}));
a.h2("Instance");
a(o.flat, 'foo', "Value");
a(o.hasOwnProperty('flat'), false, "Instance");
a(Foo.prototype.flat, 'foo', "Prototype");
a.h2("Direct");
a(Foo.prototype.flat2, 'bar');
};