1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-13 03:02:49 +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 719ae331ae
commit c96a84d0ff
13249 changed files with 317868 additions and 2101398 deletions

10
node_modules/jade/lib/compiler.js generated vendored
View File

@@ -195,11 +195,11 @@ Compiler.prototype = {
var debug = this.debug;
if (debug) {
this.buf.push('jade_debug.unshift({ lineno: ' + node.line
+ ', filename: ' + (node.filename
this.buf.push('jade_debug.unshift(new jade.DebugItem( ' + node.line
+ ', ' + (node.filename
? utils.stringify(node.filename)
: 'jade_debug[0].filename')
+ ' });');
+ ' ));');
}
// Massive hack to fix our context
@@ -404,7 +404,9 @@ Compiler.prototype = {
if (args.length && /^\.\.\./.test(args[args.length - 1].trim())) {
rest = args.pop().trim().replace(/^\.\.\./, '');
}
this.buf.push(name + ' = function(' + args.join(',') + '){');
// we need use jade_interp here for v8: https://code.google.com/p/v8/issues/detail?id=4165
// once fixed, use this: this.buf.push(name + ' = function(' + args.join(',') + '){');
this.buf.push(name + ' = jade_interp = function(' + args.join(',') + '){');
this.buf.push('var block = (this && this.block), attributes = (this && this.attributes) || {};');
if (rest) {
this.buf.push('var ' + rest + ' = [];');

88
node_modules/jade/lib/filters.js generated vendored
View File

@@ -1,14 +1,96 @@
'use strict';
var transformers = require('transformers');
var jstransformer = require('jstransformer');
var uglify = require('uglify-js');
var CleanCSS = require('clean-css');
var warned = {};
var alternatives = {
uglifyJS: 'uglify-js',
uglify: 'uglify-js',
uglifyCSS: 'clean-css',
'uglify-css': 'clean-css' ,
uglifyJSON: 'json',
'uglify-json': 'json',
live: 'livescript',
LiveScript: 'livescript',
ls: 'livescript',
// TODO: remove if we add support for coffeekup
coffeekup: 'coffeecup',
// The `style` transformer is not the same as the `stylus` jstransformer
styl: 'stylus',
coffee: 'coffee-script',
coffeescript: 'coffee-script',
coffeeScript: 'coffee-script',
// these marker transformers haven't made sense in a long time
css: 'verbatim',
js: 'verbatim',
};
var deprecated = ['jqtpl', 'jazz'];
function getMarkdownImplementation() {
var implementations = ['marked', 'supermarked', 'markdown-js', 'markdown'];
while (implementations.length) {
try {
require(implementations[0]);
return implementations[0];
} catch (ex) {
implementations.shift();
}
}
return 'markdown-it';
}
module.exports = filter;
function filter(name, str, options) {
if (typeof filter[name] === 'function') {
return filter[name](str, options);
} else if (transformers[name]) {
return transformers[name].renderSync(str, options);
} else {
throw new Error('unknown filter ":' + name + '"');
var tr;
try {
tr = jstransformer(require('jstransformer-' + name));
} catch (ex) {}
if (tr) {
// TODO: we may want to add a way for people to separately specify "locals"
var result = tr.render(str, options, options).body;
if (options && options.minify) {
try {
switch (tr.outputFormat) {
case 'js':
result = uglify.minify(result, {fromString: true}).code;
break;
case 'css':
result = new CleanCSS().minify(result).styles;
break;
}
} catch (ex) {
// better to fail to minify than output nothing
}
}
return result;
} else if (transformers[name]) {
if (!warned[name]) {
warned[name] = true;
if (name === 'md' || name === 'markdown') {
var implementation = getMarkdownImplementation();
console.log('Transformers.' + name + ' is deprecated, you must replace the :' +
name + ' jade filter, with :' +
implementation + ' and install jstransformer-' +
implementation + ' before you update to jade@2.0.0.');
} else if (alternatives[name]) {
console.log('Transformers.' + name + ' is deprecated, you must replace the :' +
name + ' jade filter, with :' +
alternatives[name] + ' and install jstransformer-' +
alternatives[name] + ' before you update to jade@2.0.0.');
} else {
console.log('Transformers.' + name + ' is deprecated, to continue using the :' +
name + ' jade filter after jade@2.0.0, you will need to install jstransformer-' +
name.toLowerCase() + '.');
}
}
return transformers[name].renderSync(str, options);
} else {
throw new Error('unknown filter ":' + name + '"');
}
}
}

13
node_modules/jade/lib/index.js generated vendored
View File

@@ -205,7 +205,7 @@ exports.compile = function(str, options){
var parsed = parse(str, options);
if (options.compileDebug !== false) {
fn = [
'var jade_debug = [{ lineno: 1, filename: ' + filename + ' }];'
'var jade_debug = [ new jade.DebugItem( 1, ' + filename + ' ) ];'
, 'try {'
, parsed.body
, '} catch (err) {'
@@ -256,7 +256,7 @@ exports.compileClientWithDependenciesTracked = function(str, options){
var parsed = parse(str, options);
if (options.compileDebug) {
fn = [
'var jade_debug = [{ lineno: 1, filename: ' + filename + ' }];'
'var jade_debug = [ new jade.DebugItem( 1, ' + filename + ' ) ];'
, 'try {'
, parsed.body
, '} catch (err) {'
@@ -397,7 +397,7 @@ exports.compileFileClient = function(path, options){
options.filename = path;
if (options.cache && exports.cache[key]) {
return exports.cache[key];
return exports.cache[key];
}
var str = fs.readFileSync(options.filename, 'utf8');
@@ -410,4 +410,9 @@ exports.compileFileClient = function(path, options){
* Express support.
*/
exports.__express = exports.renderFile;
exports.__express = function(path, options, fn) {
if(options.compileDebug == undefined && process.env.NODE_ENV === 'production') {
options.compileDebug = false;
}
exports.renderFile(path, options, fn);
}

17
node_modules/jade/lib/lexer.js generated vendored
View File

@@ -586,6 +586,21 @@ Lexer.prototype = {
}
},
/**
* Block code.
*/
blockCode: function() {
var captures;
if (captures = /^-\n/.exec(this.input)) {
this.consume(captures[0].length - 1);
var tok = this.tok('blockCode');
this.pipeless = true;
return tok;
}
},
/**
* Attributes.
*/
@@ -845,6 +860,7 @@ Lexer.prototype = {
if (isMatch) {
// consume test along with `\n` prefix if match
this.consume(str.length + 1);
++this.lineno;
tokens.push(str.substr(indent.length));
}
} while(this.input.length && isMatch);
@@ -916,6 +932,7 @@ Lexer.prototype = {
|| this["while"]()
|| this.tag()
|| this.filter()
|| this.blockCode()
|| this.code()
|| this.id()
|| this.className()

21
node_modules/jade/lib/parser.js generated vendored
View File

@@ -233,6 +233,8 @@ Parser.prototype = {
return this.parseEach();
case 'code':
return this.parseCode();
case 'blockCode':
return this.parseBlockCode();
case 'call':
return this.parseCall();
case 'interpolation':
@@ -376,6 +378,25 @@ Parser.prototype = {
return node;
},
/**
* block code
*/
parseBlockCode: function(){
var tok = this.expect('blockCode');
var node;
var body = this.peek();
var text;
if (body.type === 'pipeless-text') {
this.advance();
text = body.val.join('\n');
} else {
text = '';
}
node = new nodes.Code(text, false, false);
return node;
},
/**
* comment
*/

26
node_modules/jade/lib/runtime.js generated vendored
View File

@@ -179,12 +179,21 @@ exports.attrs = function attrs(obj, terse){
* @api private
*/
exports.escape = function escape(html){
var result = String(html)
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
var jade_encode_html_rules = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;'
};
var jade_match_html = /[&<>"]/g;
function jade_encode_char(c) {
return jade_encode_html_rules[c] || c;
}
exports.escape = jade_escape;
function jade_escape(html){
var result = String(html).replace(jade_match_html, jade_encode_char);
if (result === '' + html) return html;
else return result;
};
@@ -230,3 +239,8 @@ exports.rethrow = function rethrow(err, filename, lineno, str){
+ '\n' + context + '\n\n' + err.message;
throw err;
};
exports.DebugItem = function DebugItem(lineno, filename) {
this.lineno = lineno;
this.filename = filename;
}