summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2014-02-13 15:52:01 -0800
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-02-13 15:54:07 -0800
commit37376debe54ccd2889174ebb8ffc3949e0bda298 (patch)
treec2f800e969bd91e5d8a78faa9d04a779a1a2ceb2 /tools
parentb222374b072caf062df587aa7a7d8773c2c82f31 (diff)
downloadandroid-node-v8-37376debe54ccd2889174ebb8ffc3949e0bda298.tar.gz
android-node-v8-37376debe54ccd2889174ebb8ffc3949e0bda298.tar.bz2
android-node-v8-37376debe54ccd2889174ebb8ffc3949e0bda298.zip
website: move website to joyent/node-website
The website will no longer be living in the source repository instead it can be found at http://github.com/joyent/node-website
Diffstat (limited to 'tools')
-rw-r--r--tools/blog/README.md5
-rw-r--r--tools/blog/generate.js270
-rw-r--r--tools/blog/node_modules/ejs/.gitmodules0
-rw-r--r--tools/blog/node_modules/ejs/.npmignore4
-rw-r--r--tools/blog/node_modules/ejs/History.md98
-rw-r--r--tools/blog/node_modules/ejs/Makefile23
-rw-r--r--tools/blog/node_modules/ejs/Readme.md151
-rw-r--r--tools/blog/node_modules/ejs/benchmark.js14
-rw-r--r--tools/blog/node_modules/ejs/ejs.js567
-rw-r--r--tools/blog/node_modules/ejs/ejs.min.js2
-rw-r--r--tools/blog/node_modules/ejs/examples/client.html24
-rw-r--r--tools/blog/node_modules/ejs/examples/list.ejs7
-rw-r--r--tools/blog/node_modules/ejs/examples/list.js14
-rw-r--r--tools/blog/node_modules/ejs/index.js2
-rw-r--r--tools/blog/node_modules/ejs/lib/ejs.js298
-rw-r--r--tools/blog/node_modules/ejs/lib/filters.js198
-rw-r--r--tools/blog/node_modules/ejs/lib/utils.js23
-rw-r--r--tools/blog/node_modules/ejs/package.json23
-rw-r--r--tools/blog/node_modules/ejs/support/compile.js174
-rw-r--r--tools/blog/node_modules/ejs/test/ejs.test.js329
-rw-r--r--tools/blog/node_modules/ejs/test/fixtures/user.ejs1
-rw-r--r--tools/blog/node_modules/glob/.npmignore2
-rw-r--r--tools/blog/node_modules/glob/.travis.yml4
-rw-r--r--tools/blog/node_modules/glob/LICENCE25
-rw-r--r--tools/blog/node_modules/glob/LICENSE27
-rw-r--r--tools/blog/node_modules/glob/README.md233
-rw-r--r--tools/blog/node_modules/glob/examples/g.js9
-rw-r--r--tools/blog/node_modules/glob/examples/usr-local.js9
-rw-r--r--tools/blog/node_modules/glob/glob.js601
-rw-r--r--tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore1
-rw-r--r--tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE23
-rw-r--r--tools/blog/node_modules/glob/node_modules/graceful-fs/README.md5
-rw-r--r--tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js275
-rw-r--r--tools/blog/node_modules/glob/node_modules/graceful-fs/package.json22
-rw-r--r--tools/blog/node_modules/glob/node_modules/graceful-fs/test/open.js41
-rw-r--r--tools/blog/node_modules/glob/node_modules/inherits/README.md51
-rw-r--r--tools/blog/node_modules/glob/node_modules/inherits/inherits.js29
-rw-r--r--tools/blog/node_modules/glob/node_modules/inherits/package.json25
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml4
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/LICENSE23
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/README.md218
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js1052
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore1
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS5
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE23
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md26
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js156
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json45
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js171
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE27
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md53
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js283
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json38
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js39
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js24
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/package.json36
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js273
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js33
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js14
-rw-r--r--tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js274
-rw-r--r--tools/blog/node_modules/glob/package.json35
-rw-r--r--tools/blog/node_modules/glob/test/00-setup.js61
-rw-r--r--tools/blog/node_modules/glob/test/bash-comparison.js119
-rw-r--r--tools/blog/node_modules/glob/test/cwd-test.js55
-rw-r--r--tools/blog/node_modules/glob/test/mark.js63
-rw-r--r--tools/blog/node_modules/glob/test/pause-resume.js98
-rw-r--r--tools/blog/node_modules/glob/test/root-nomount.js39
-rw-r--r--tools/blog/node_modules/glob/test/root.js43
-rw-r--r--tools/blog/node_modules/glob/test/zz-cleanup.js11
-rw-r--r--tools/blog/node_modules/marked/.npmignore2
-rw-r--r--tools/blog/node_modules/marked/LICENSE19
-rw-r--r--tools/blog/node_modules/marked/Makefile9
-rw-r--r--tools/blog/node_modules/marked/README.md125
-rwxr-xr-xtools/blog/node_modules/marked/bin/marked127
-rw-r--r--tools/blog/node_modules/marked/index.js1
-rw-r--r--tools/blog/node_modules/marked/lib/marked.js791
-rw-r--r--tools/blog/node_modules/marked/man/marked.149
-rw-r--r--tools/blog/node_modules/marked/package.json40
-rw-r--r--tools/blog/node_modules/mkdirp/.npmignore2
-rw-r--r--tools/blog/node_modules/mkdirp/.travis.yml4
-rw-r--r--tools/blog/node_modules/mkdirp/LICENSE21
-rw-r--r--tools/blog/node_modules/mkdirp/README.markdown61
-rw-r--r--tools/blog/node_modules/mkdirp/examples/pow.js6
-rw-r--r--tools/blog/node_modules/mkdirp/index.js94
-rw-r--r--tools/blog/node_modules/mkdirp/package.json32
-rw-r--r--tools/blog/node_modules/mkdirp/test/chmod.js38
-rw-r--r--tools/blog/node_modules/mkdirp/test/clobber.js37
-rw-r--r--tools/blog/node_modules/mkdirp/test/mkdirp.js28
-rw-r--r--tools/blog/node_modules/mkdirp/test/perm.js32
-rw-r--r--tools/blog/node_modules/mkdirp/test/perm_sync.js39
-rw-r--r--tools/blog/node_modules/mkdirp/test/race.js41
-rw-r--r--tools/blog/node_modules/mkdirp/test/rel.js32
-rw-r--r--tools/blog/node_modules/mkdirp/test/return.js25
-rw-r--r--tools/blog/node_modules/mkdirp/test/return_sync.js24
-rw-r--r--tools/blog/node_modules/mkdirp/test/root.js18
-rw-r--r--tools/blog/node_modules/mkdirp/test/sync.js32
-rw-r--r--tools/blog/node_modules/mkdirp/test/umask.js28
-rw-r--r--tools/blog/node_modules/mkdirp/test/umask_sync.js32
-rw-r--r--tools/blog/node_modules/semver/LICENSE23
-rw-r--r--tools/blog/node_modules/semver/README.md119
-rwxr-xr-xtools/blog/node_modules/semver/bin/semver71
-rw-r--r--tools/blog/node_modules/semver/package.json26
-rw-r--r--tools/blog/node_modules/semver/semver.js305
-rw-r--r--tools/blog/node_modules/semver/test.js405
-rw-r--r--tools/blog/templates/index.ejs1
105 files changed, 0 insertions, 9690 deletions
diff --git a/tools/blog/README.md b/tools/blog/README.md
deleted file mode 100644
index 52a3be7fd2..0000000000
--- a/tools/blog/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# node-blog-gen
-
-Generates the node blog from the markdown files in doc/blog/.
-
-
diff --git a/tools/blog/generate.js b/tools/blog/generate.js
deleted file mode 100644
index fa101dc0d9..0000000000
--- a/tools/blog/generate.js
+++ /dev/null
@@ -1,270 +0,0 @@
-#!/usr/bin/env node
-var fs = require('fs');
-var marked = require('marked');
-var mkdirp = require('mkdirp');
-var glob = require('glob');
-var ejs = require('ejs');
-var path = require('path');
-var semver = require('semver');
-
-var input = path.resolve(process.argv[2]);
-var output = path.resolve(process.argv[3]);
-var template = path.resolve(process.argv[4]);
-var rssTemplate = path.resolve(process.argv[5]);
-
-var config = {
- postsPerPage: 4
-};
-
-console.error("argv=%j", process.argv)
-
-fs.readFile(template, 'utf8', function(er, contents) {
- if (er) throw er;
- template = ejs.compile(contents, template);
- template.filename = 'index.html';
- fs.readFile(rssTemplate, 'utf8', function(er, contents) {
- if (er) throw er;
- rssTemplate = ejs.compile(contents, rssTemplate);
- rssTemplate.filename = 'index.xml';
- readInput();
- });
-});
-
-function readInput() {
- glob(input + '/**/*.md', function(er, files) {
- if (er) throw er;
- readFiles(files);
- });
-}
-
-function readFiles(files) {
- var n = files.length;
- var data = { files: {}, feeds: {}, posts: {}};
-
- files.forEach(function(file) {
- fs.readFile(file, 'utf8', next(file));
- });
-
- function next(file) { return function(er, contents) {
- if (er) throw er;
- if (contents) {
- contents = parseFile(file, contents);
- if (contents) {
- data.files[file] = contents
- }
- }
- if (--n === 0) {
- buildOutput(data);
- }
- }}
-}
-
-function parseFile(file, contents) {
- var c = contents.split('\n\n');
- var head = c.shift();
- c = c.join('\n\n');
- var post = head.split('\n').reduce(function(set, kv) {
- kv = kv.split(':');
- var key = kv.shift().trim();
- var val = kv.join(':').trim();
- set[key] = val;
- return set;
- }, {});
- if (post.status && post.status !== 'publish') return null;
- post.body = c;
- post.src = file;
- return post;
-}
-
-function buildPermalinks(data) {
- Object.keys(data.files).forEach(function(k) {
- data.posts[k] = buildPermalink(k, data.files[k]);
- });
-}
-
-function buildPermalink(key, post) {
- var data = {};
- data.pageid = post.slug;
- data.title = post.title;
- data.content = post.content = marked.parse(post.body);
-
- // Fix for chjj/marked#56
- data.content = post.content = data.content
- .replace(/<a href="([^"]+)&lt;\/a&gt;">\1&lt;\/a&gt;/g, '$1');
-
- data.post = post;
-
- if (!post.date) throw new Error('post date is required ' + post.src);
- else post.date = new Date(post.date);
- var d = post.date;
-
- var y = d.getYear() + 1900;
- var m = d.getMonth() + 1;
- if (m < 10) m = '0' + m;
- var d = d.getDate();
- if (d < 10) d = '0' + d;
- var uri = '/' + y + '/' + m + '/' + d + '/' + post.slug + '/';
- post.data = data;
- post.uri = uri;
-
- post.permalink = data.permalink = uri;
- return data;
-}
-
-function writeFile(uri, data, templ) {
- if (!templ) templ = template;
- if (data.uri)
- data.uri = path.join(data.uri);
- uri = path.join(uri);
- var contents = templ(data);
- var outdir = path.join(output, uri);
- mkdirp(outdir, function(er) {
- if (er) throw er;
- var file = path.resolve(outdir, templ.filename);
- fs.writeFile(file, contents, 'utf8', function(er) {
- if (er) throw er;
- console.log('wrote: ', data.pageid, path.relative(process.cwd(), file));
- });
- });
-}
-
-// sort in reverse chronological order
-// prune out any releases that are not the most recent on their branch.
-function buildFeeds(data) {
- // first, sort by date.
- var posts = Object.keys(data.posts).map(function(k) {
- return data.posts[k].post;
- }).sort(function(a, b) {
- a = a.date.getTime();
- b = b.date.getTime();
- return (a === b) ? 0 : a > b ? -1 : 1;
- })
-
- // separate release posts by release families.
- var releases = posts.reduce(function(releases, post) {
- if (post.category !== 'release') return releases;
- var ver = semver.parse(post.version);
- if (!ver) return;
- var major = +ver[1];
- var minor = +ver[2];
- var patch = +ver[3];
- var family = [major, minor];
- ver = [major, minor, patch, post];
- if (family[1] % 2) family[1]++;
- family = family.join('.');
- post.family = family;
- releases[family] = releases[family] || [];
- releases[family].push(post);
- return releases;
- }, {});
-
- // separate by categories.
- var categories = posts.reduce(function(categories, post) {
- if (!post.category) return categories;
- if (!categories[post.category]) {
- categories[post.category] = [];
- }
- categories[post.category].push(post);
- return categories;
- }, {});
-
- // paginate categories.
- for (var cat in categories) {
- categories[cat] = paginate(categories[cat], cat);
- }
-
- // show all posts in main feed.
- var main = posts;
-
- // add previous/next based on main feed.
- main.forEach(function (post, i, posts) {
- post.next = posts[i - 1];
- post.prev = posts[i + 1];
- })
-
- // paginate each feed.
- main = paginate(main, '');
-
- // put previous/next links on orphaned old releases so you can get back
- for (var family in releases) {
- releases[family].forEach(function(post, i, family) {
- if (!post.next) post.next = family[i - 1];
- if (!post.next) post.next = family[0].next;
- // if (!post.next) post.next = family[0];
-
- if (!post.prev) post.prev = family[i + 1];
- if (!post.prev) post.prev = family[0].prev;
- });
- // paginate
- releases[family] = paginate(releases[family], 'release-' + family);
- }
-
- // paginate
- data.feeds = {
- main: main,
- categories: categories,
- releases: releases
- };
-}
-
-function paginate(set, title) {
- var pp = config.postsPerPage || 5
- var pages = [];
- for (var i = 0; i < set.length; i += pp) {
- pages.push(set.slice(i, i + pp));
- }
- var id = title.replace(/[^a-zA-Z0-9.]+/g, '-');
- return { id: id || 'index', pageid: id, posts: set, pages: pages, title: title };
-}
-
-function writePermalinks(data) {
- Object.keys(data.posts).forEach(function(k) {
- var post = data.posts[k];
- writeFile(post.permalink, post);
- });
-}
-
-function writeFeeds(data) {
- writeFeed(data.feeds.main);
-
- for (var feed in data.feeds.categories) {
- writeFeed(data.feeds.categories[feed]);
- }
- for (var feed in data.feeds.releases) {
- writeFeed(data.feeds.releases[feed]);
- }
-}
-
-function writeFeed(feed) {
- var title = feed.title;
- feed.pages.forEach(function(page, p, pages) {
- writePaginated(feed.title, page, p, pages.length, feed.id);
- });
-}
-
-function writePaginated(title, posts, p, total, id) {
- var uri = '/' + encodeURIComponent(title) + '/';
- var d = {
- title: title,
- page: p,
- posts: posts,
- total: total,
- paginated: true,
- pageid: id + '-' + p,
- uri: uri
- };
- if (p === 0) {
- writeFile(uri, d);
- writeFile('/feed' + uri, d, rssTemplate);
- }
- writeFile(uri + p, d);
- writeFile('/feed' + uri + p, d, rssTemplate);
-}
-
-function buildOutput(data) {
- buildPermalinks(data);
- buildFeeds(data);
- writePermalinks(data);
- writeFeeds(data);
-}
-
diff --git a/tools/blog/node_modules/ejs/.gitmodules b/tools/blog/node_modules/ejs/.gitmodules
deleted file mode 100644
index e69de29bb2..0000000000
--- a/tools/blog/node_modules/ejs/.gitmodules
+++ /dev/null
diff --git a/tools/blog/node_modules/ejs/.npmignore b/tools/blog/node_modules/ejs/.npmignore
deleted file mode 100644
index 020ddac2ce..0000000000
--- a/tools/blog/node_modules/ejs/.npmignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# ignore any vim files:
-*.sw[a-z]
-vim/.netrwhist
-node_modules
diff --git a/tools/blog/node_modules/ejs/History.md b/tools/blog/node_modules/ejs/History.md
deleted file mode 100644
index 75dc16f51f..0000000000
--- a/tools/blog/node_modules/ejs/History.md
+++ /dev/null
@@ -1,98 +0,0 @@
-
-0.7.1 / 2012-03-26
-==================
-
- * Fixed exception when using express in production caused by typo. [slaskis]
-
-0.7.0 / 2012-03-24
-==================
-
- * Added newline consumption support (`-%>`) [whoatemydomain]
-
-0.6.1 / 2011-12-09
-==================
-
- * Fixed `ejs.renderFile()`
-
-0.6.0 / 2011-12-09
-==================
-
- * Changed: you no longer need `{ locals: {} }`
-
-0.5.0 / 2011-11-20
-==================
-
- * Added express 3.x support
- * Added ejs.renderFile()
- * Added 'json' filter
- * Fixed tests for 0.5.x
-
-0.4.3 / 2011-06-20
-==================
-
- * Fixed stacktraces line number when used multiline js expressions [Octave]
-
-0.4.2 / 2011-05-11
-==================
-
- * Added client side support
-
-0.4.1 / 2011-04-21
-==================
-
- * Fixed error context
-
-0.4.0 / 2011-04-21
-==================
-
- * Added; ported jade's error reporting to ejs. [slaskis]
-
-0.3.1 / 2011-02-23
-==================
-
- * Fixed optional `compile()` options
-
-0.3.0 / 2011-02-14
-==================
-
- * Added 'json' filter [Yuriy Bogdanov]
- * Use exported version of parse function to allow monkey-patching [Anatoliy Chakkaev]
-
-0.2.1 / 2010-10-07
-==================
-
- * Added filter support
- * Fixed _cache_ option. ~4x performance increase
-
-0.2.0 / 2010-08-05
-==================
-
- * Added support for global tag config
- * Added custom tag support. Closes #5
- * Fixed whitespace bug. Closes #4
-
-0.1.0 / 2010-08-04
-==================
-
- * Faster implementation [ashleydev]
-
-0.0.4 / 2010-08-02
-==================
-
- * Fixed single quotes for content outside of template tags. [aniero]
- * Changed; `exports.compile()` now expects only "locals"
-
-0.0.3 / 2010-07-15
-==================
-
- * Fixed single quotes
-
-0.0.2 / 2010-07-09
-==================
-
- * Fixed newline preservation
-
-0.0.1 / 2010-07-09
-==================
-
- * Initial release
diff --git a/tools/blog/node_modules/ejs/Makefile b/tools/blog/node_modules/ejs/Makefile
deleted file mode 100644
index 14b93049da..0000000000
--- a/tools/blog/node_modules/ejs/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-
-SRC = $(shell find lib -name "*.js" -type f)
-UGLIFY_FLAGS = --no-mangle
-
-all: ejs.min.js
-
-test:
- @./node_modules/.bin/mocha \
- --ui exports
-
-ejs.js: $(SRC)
- @node support/compile.js $^
-
-ejs.min.js: ejs.js
- @uglifyjs $(UGLIFY_FLAGS) $< > $@ \
- && du ejs.min.js \
- && du ejs.js
-
-clean:
- rm -f ejs.js
- rm -f ejs.min.js
-
-.PHONY: test \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/Readme.md b/tools/blog/node_modules/ejs/Readme.md
deleted file mode 100644
index 8e398fd20c..0000000000
--- a/tools/blog/node_modules/ejs/Readme.md
+++ /dev/null
@@ -1,151 +0,0 @@
-
-# EJS
-
-Embedded JavaScript templates.
-
-## Installation
-
- $ npm install ejs
-
-## Features
-
- * Complies with the [Express](http://expressjs.com) view system
- * Static caching of intermediate JavaScript
- * Unbuffered code for conditionals etc `<% code %>`
- * Escapes html by default with `<%= code %>`
- * Unescaped buffering with `<%- code %>`
- * Supports tag customization
- * Filter support for designer-friendly templates
- * Client-side support
- * Newline slurping with `<% code -%>` or `<% -%>` or `<%= code -%>` or `<%- code -%>`
-
-## Example
-
- <% if (user) { %>
- <h2><%= user.name %></h2>
- <% } %>
-
-## Usage
-
- ejs.compile(str, options);
- // => Function
-
- ejs.render(str, options);
- // => str
-
-## Options
-
- - `cache` Compiled functions are cached, requires `filename`
- - `filename` Used by `cache` to key caches
- - `scope` Function execution context
- - `debug` Output generated function body
- - `open` Open tag, defaulting to "<%"
- - `close` Closing tag, defaulting to "%>"
- - * All others are template-local variables
-
-## Custom tags
-
-Custom tags can also be applied globally:
-
- var ejs = require('ejs');
- ejs.open = '{{';
- ejs.close = '}}';
-
-Which would make the following a valid template:
-
- <h1>{{= title }}</h1>
-
-## Filters
-
-EJS conditionally supports the concept of "filters". A "filter chain"
-is a designer friendly api for manipulating data, without writing JavaScript.
-
-Filters can be applied by supplying the _:_ modifier, so for example if we wish to take the array `[{ name: 'tj' }, { name: 'mape' }, { name: 'guillermo' }]` and output a list of names we can do this simply with filters:
-
-Template:
-
- <p><%=: users | map:'name' | join %></p>
-
-Output:
-
- <p>Tj, Mape, Guillermo</p>
-
-Render call:
-
- ejs.render(str, {
- users: [
- { name: 'tj' },
- { name: 'mape' },
- { name: 'guillermo' }
- ]
- });
-
-Or perhaps capitalize the first user's name for display:
-
- <p><%=: users | first | capitalize %></p>
-
-## Filter list
-
-Currently these filters are available:
-
- - first
- - last
- - capitalize
- - downcase
- - upcase
- - sort
- - sort_by:'prop'
- - size
- - length
- - plus:n
- - minus:n
- - times:n
- - divided_by:n
- - join:'val'
- - truncate:n
- - truncate_words:n
- - replace:pattern,substitution
- - prepend:val
- - append:val
- - map:'prop'
- - reverse
- - get:'prop'
-
-## Adding filters
-
- To add a filter simply add a method to the `.filters` object:
-
-```js
-ejs.filters.last = function(obj) {
- return obj[obj.length - 1];
-};
-```
-
-## client-side support
-
- include `./ejs.js` or `./ejs.min.js` and `require("ejs").compile(str)`.
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2009-2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
-
-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.
diff --git a/tools/blog/node_modules/ejs/benchmark.js b/tools/blog/node_modules/ejs/benchmark.js
deleted file mode 100644
index 7b267e1603..0000000000
--- a/tools/blog/node_modules/ejs/benchmark.js
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-var ejs = require('./lib/ejs'),
- str = '<% if (foo) { %><p><%= foo %></p><% } %>',
- times = 50000;
-
-console.log('rendering ' + times + ' times');
-
-var start = new Date;
-while (times--) {
- ejs.render(str, { cache: true, filename: 'test', locals: { foo: 'bar' }});
-}
-
-console.log('took ' + (new Date - start) + 'ms'); \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/ejs.js b/tools/blog/node_modules/ejs/ejs.js
deleted file mode 100644
index b0fa93b12b..0000000000
--- a/tools/blog/node_modules/ejs/ejs.js
+++ /dev/null
@@ -1,567 +0,0 @@
-
-// CommonJS require()
-
-function require(p){
- if ('fs' == p) return {};
- var path = require.resolve(p)
- , mod = require.modules[path];
- if (!mod) throw new Error('failed to require "' + p + '"');
- if (!mod.exports) {
- mod.exports = {};
- mod.call(mod.exports, mod, mod.exports, require.relative(path));
- }
- return mod.exports;
- }
-
-require.modules = {};
-
-require.resolve = function (path){
- var orig = path
- , reg = path + '.js'
- , index = path + '/index.js';
- return require.modules[reg] && reg
- || require.modules[index] && index
- || orig;
- };
-
-require.register = function (path, fn){
- require.modules[path] = fn;
- };
-
-require.relative = function (parent) {
- return function(p){
- if ('.' != p.substr(0, 1)) return require(p);
-
- var path = parent.split('/')
- , segs = p.split('/');
- path.pop();
-
- for (var i = 0; i < segs.length; i++) {
- var seg = segs[i];
- if ('..' == seg) path.pop();
- else if ('.' != seg) path.push(seg);
- }
-
- return require(path.join('/'));
- };
- };
-
-
-require.register("ejs.js", function(module, exports, require){
-
-/*!
- * EJS
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var utils = require('./utils')
- , fs = require('fs');
-
-/**
- * Library version.
- */
-
-exports.version = '0.6.1';
-
-/**
- * Filters.
- *
- * @type Object
- */
-
-var filters = exports.filters = require('./filters');
-
-/**
- * Intermediate js cache.
- *
- * @type Object
- */
-
-var cache = {};
-
-/**
- * Clear intermediate js cache.
- *
- * @api public
- */
-
-exports.clearCache = function(){
- cache = {};
-};
-
-/**
- * Translate filtered code into function calls.
- *
- * @param {String} js
- * @return {String}
- * @api private
- */
-
-function filtered(js) {
- return js.substr(1).split('|').reduce(function(js, filter){
- var parts = filter.split(':')
- , name = parts.shift()
- , args = parts.shift() || '';
- if (args) args = ', ' + args;
- return 'filters.' + name + '(' + js + args + ')';
- });
-};
-
-/**
- * Re-throw the given `err` in context to the
- * `str` of ejs, `filename`, and `lineno`.
- *
- * @param {Error} err
- * @param {String} str
- * @param {String} filename
- * @param {String} lineno
- * @api private
- */
-
-function rethrow(err, str, filename, lineno){
- var lines = str.split('\n')
- , start = Math.max(lineno - 3, 0)
- , end = Math.min(lines.length, lineno + 3);
-
- // Error context
- var context = lines.slice(start, end).map(function(line, i){
- var curr = i + start + 1;
- return (curr == lineno ? ' >> ' : ' ')
- + curr
- + '| '
- + line;
- }).join('\n');
-
- // Alter exception message
- err.path = filename;
- err.message = (filename || 'ejs') + ':'
- + lineno + '\n'
- + context + '\n\n'
- + err.message;
-
- throw err;
-}
-
-/**
- * Parse the given `str` of ejs, returning the function body.
- *
- * @param {String} str
- * @return {String}
- * @api public
- */
-
-var parse = exports.parse = function(str, options){
- var options = options || {}
- , open = options.open || exports.open || '<%'
- , close = options.close || exports.close || '%>';
-
- var buf = [
- "var buf = [];"
- , "\nwith (locals) {"
- , "\n buf.push('"
- ];
-
- var lineno = 1;
-
- for (var i = 0, len = str.length; i < len; ++i) {
- if (str.slice(i, open.length + i) == open) {
- i += open.length
-
- var prefix, postfix, line = '__stack.lineno=' + lineno;
- switch (str.substr(i, 1)) {
- case '=':
- prefix = "', escape((" + line + ', ';
- postfix = ")), '";
- ++i;
- break;
- case '-':
- prefix = "', (" + line + ', ';
- postfix = "), '";
- ++i;
- break;
- default:
- prefix = "');" + line + ';';
- postfix = "; buf.push('";
- }
-
- var end = str.indexOf(close, i)
- , js = str.substring(i, end)
- , start = i
- , n = 0;
-
- while (~(n = js.indexOf("\n", n))) n++, lineno++;
- if (js.substr(0, 1) == ':') js = filtered(js);
- buf.push(prefix, js, postfix);
- i += end - start + close.length - 1;
-
- } else if (str.substr(i, 1) == "\\") {
- buf.push("\\\\");
- } else if (str.substr(i, 1) == "'") {
- buf.push("\\'");
- } else if (str.substr(i, 1) == "\r") {
- buf.push(" ");
- } else if (str.substr(i, 1) == "\n") {
- buf.push("\\n");
- lineno++;
- } else {
- buf.push(str.substr(i, 1));
- }
- }
-
- buf.push("');\n}\nreturn buf.join('');");
- return buf.join('');
-};
-
-/**
- * Compile the given `str` of ejs into a `Function`.
- *
- * @param {String} str
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-var compile = exports.compile = function(str, options){
- options = options || {};
-
- var input = JSON.stringify(str)
- , filename = options.filename
- ? JSON.stringify(options.filename)
- : 'undefined';
-
- // Adds the fancy stack trace meta info
- str = [
- 'var __stack = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
- rethrow.toString(),
- 'try {',
- exports.parse(str, options),
- '} catch (err) {',
- ' rethrow(err, __stack.input, __stack.filename, __stack.lineno);',
- '}'
- ].join("\n");
-
- if (options.debug) console.log(str);
- var fn = new Function('locals, filters, escape', str);
- return function(locals){
- return fn.call(this, locals, filters, utils.escape);
- }
-};
-
-/**
- * Render the given `str` of ejs.
- *
- * Options:
- *
- * - `locals` Local variables object
- * - `cache` Compiled functions are cached, requires `filename`
- * - `filename` Used by `cache` to key caches
- * - `scope` Function execution context
- * - `debug` Output generated function body
- * - `open` Open tag, defaulting to "<%"
- * - `close` Closing tag, defaulting to "%>"
- *
- * @param {String} str
- * @param {Object} options
- * @return {String}
- * @api public
- */
-
-exports.render = function(str, options){
- var fn
- , options = options || {};
-
- if (options.cache) {
- if (options.filename) {
- fn = cache[options.filename] || (cache[options.filename] = compile(str, options));
- } else {
- throw new Error('"cache" option requires "filename".');
- }
- } else {
- fn = compile(str, options);
- }
-
- options.__proto__ = options.locals;
- return fn.call(options.scope, options);
-};
-
-/**
- * Render an EJS file at the given `path` and callback `fn(err, str)`.
- *
- * @param {String} path
- * @param {Object|Function} options or callback
- * @param {Function} fn
- * @api public
- */
-
-exports.renderFile = function(path, options, fn){
- var key = path + ':string';
-
- if ('function' == typeof options) {
- fn = options, options = {};
- }
-
- options.filename = path;
-
- try {
- var str = options.cache
- ? exports.cache[key] || (exports.cache[key] = fs.readFileSync(path, 'utf8'))
- : fs.readFileSync(path, 'utf8');
-
- fn(null, exports.render(str, options));
- } catch (err) {
- fn(err);
- }
-};
-
-// express support
-
-exports.__express = exports.renderFile;
-
-/**
- * Expose to require().
- */
-
-if (require.extensions) {
- require.extensions['.ejs'] = function(module, filename) {
- source = require('fs').readFileSync(filename, 'utf-8');
- module._compile(compile(source, {}), filename);
- };
-} else if (require.registerExtension) {
- require.registerExtension('.ejs', function(src) {
- return compile(src, {});
- });
-}
-
-}); // module: ejs.js
-
-require.register("filters.js", function(module, exports, require){
-
-/*!
- * EJS - Filters
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * First element of the target `obj`.
- */
-
-exports.first = function(obj) {
- return obj[0];
-};
-
-/**
- * Last element of the target `obj`.
- */
-
-exports.last = function(obj) {
- return obj[obj.length - 1];
-};
-
-/**
- * Capitalize the first letter of the target `str`.
- */
-
-exports.capitalize = function(str){
- str = String(str);
- return str[0].toUpperCase() + str.substr(1, str.length);
-};
-
-/**
- * Downcase the target `str`.
- */
-
-exports.downcase = function(str){
- return String(str).toLowerCase();
-};
-
-/**
- * Uppercase the target `str`.
- */
-
-exports.upcase = function(str){
- return String(str).toUpperCase();
-};
-
-/**
- * Sort the target `obj`.
- */
-
-exports.sort = function(obj){
- return Object.create(obj).sort();
-};
-
-/**
- * Sort the target `obj` by the given `prop` ascending.
- */
-
-exports.sort_by = function(obj, prop){
- return Object.create(obj).sort(function(a, b){
- a = a[prop], b = b[prop];
- if (a > b) return 1;
- if (a < b) return -1;
- return 0;
- });
-};
-
-/**
- * Size or length of the target `obj`.
- */
-
-exports.size = exports.length = function(obj) {
- return obj.length;
-};
-
-/**
- * Add `a` and `b`.
- */
-
-exports.plus = function(a, b){
- return Number(a) + Number(b);
-};
-
-/**
- * Subtract `b` from `a`.
- */
-
-exports.minus = function(a, b){
- return Number(a) - Number(b);
-};
-
-/**
- * Multiply `a` by `b`.
- */
-
-exports.times = function(a, b){
- return Number(a) * Number(b);
-};
-
-/**
- * Divide `a` by `b`.
- */
-
-exports.divided_by = function(a, b){
- return Number(a) / Number(b);
-};
-
-/**
- * Join `obj` with the given `str`.
- */
-
-exports.join = function(obj, str){
- return obj.join(str || ', ');
-};
-
-/**
- * Truncate `str` to `len`.
- */
-
-exports.truncate = function(str, len){
- str = String(str);
- return str.substr(0, len);
-};
-
-/**
- * Truncate `str` to `n` words.
- */
-
-exports.truncate_words = function(str, n){
- var str = String(str)
- , words = str.split(/ +/);
- return words.slice(0, n).join(' ');
-};
-
-/**
- * Replace `pattern` with `substitution` in `str`.
- */
-
-exports.replace = function(str, pattern, substitution){
- return String(str).replace(pattern, substitution || '');
-};
-
-/**
- * Prepend `val` to `obj`.
- */
-
-exports.prepend = function(obj, val){
- return Array.isArray(obj)
- ? [val].concat(obj)
- : val + obj;
-};
-
-/**
- * Append `val` to `obj`.
- */
-
-exports.append = function(obj, val){
- return Array.isArray(obj)
- ? obj.concat(val)
- : obj + val;
-};
-
-/**
- * Map the given `prop`.
- */
-
-exports.map = function(arr, prop){
- return arr.map(function(obj){
- return obj[prop];
- });
-};
-
-/**
- * Reverse the given `obj`.
- */
-
-exports.reverse = function(obj){
- return Array.isArray(obj)
- ? obj.reverse()
- : String(obj).split('').reverse().join('');
-};
-
-/**
- * Get `prop` of the given `obj`.
- */
-
-exports.get = function(obj, prop){
- return obj[prop];
-};
-
-/**
- * Packs the given `obj` into json string
- */
-exports.json = function(obj){
- return JSON.stringify(obj);
-};
-}); // module: filters.js
-
-require.register("utils.js", function(module, exports, require){
-
-/*!
- * EJS
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Escape the given string of `html`.
- *
- * @param {String} html
- * @return {String}
- * @api private
- */
-
-exports.escape = function(html){
- return String(html)
- .replace(/&(?!\w+;)/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/"/g, '&quot;');
-};
-
-}); // module: utils.js
diff --git a/tools/blog/node_modules/ejs/ejs.min.js b/tools/blog/node_modules/ejs/ejs.min.js
deleted file mode 100644
index b87881320e..0000000000
--- a/tools/blog/node_modules/ejs/ejs.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// CommonJS require()
-function require(p){if("fs"==p)return{};var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');mod.exports||(mod.exports={},mod.call(mod.exports,mod,mod.exports,require.relative(path)));return mod.exports}require.modules={},require.resolve=function(path){var orig=path,reg=path+".js",index=path+"/index.js";return require.modules[reg]&&reg||require.modules[index]&&index||orig},require.register=function(path,fn){require.modules[path]=fn},require.relative=function(parent){return function(p){if("."!=p.substr(0,1))return require(p);var path=parent.split("/"),segs=p.split("/");path.pop();for(var i=0;i<segs.length;i++){var seg=segs[i];".."==seg?path.pop():"."!=seg&&path.push(seg)}return require(path.join("/"))}},require.register("ejs.js",function(module,exports,require){var utils=require("./utils"),fs=require("fs");exports.version="0.6.1";var filters=exports.filters=require("./filters"),cache={};exports.clearCache=function(){cache={}};function filtered(js){return js.substr(1).split("|").reduce(function(js,filter){var parts=filter.split(":"),name=parts.shift(),args=parts.shift()||"";args&&(args=", "+args);return"filters."+name+"("+js+args+")"})}function rethrow(err,str,filename,lineno){var lines=str.split("\n"),start=Math.max(lineno-3,0),end=Math.min(lines.length,lineno+3),context=lines.slice(start,end).map(function(line,i){var curr=i+start+1;return(curr==lineno?" >> ":" ")+curr+"| "+line}).join("\n");err.path=filename,err.message=(filename||"ejs")+":"+lineno+"\n"+context+"\n\n"+err.message;throw err}var parse=exports.parse=function(str,options){var options=options||{},open=options.open||exports.open||"<%",close=options.close||exports.close||"%>",buf=["var buf = [];","\nwith (locals) {","\n buf.push('"],lineno=1;for(var i=0,len=str.length;i<len;++i)if(str.slice(i,open.length+i)==open){i+=open.length;var prefix,postfix,line="__stack.lineno="+lineno;switch(str.substr(i,1)){case"=":prefix="', escape(("+line+", ",postfix=")), '",++i;break;case"-":prefix="', ("+line+", ",postfix="), '",++i;break;default:prefix="');"+line+";",postfix="; buf.push('"}var end=str.indexOf(close,i),js=str.substring(i,end),start=i,n=0;while(~(n=js.indexOf("\n",n)))n++,lineno++;js.substr(0,1)==":"&&(js=filtered(js)),buf.push(prefix,js,postfix),i+=end-start+close.length-1}else str.substr(i,1)=="\\"?buf.push("\\\\"):str.substr(i,1)=="'"?buf.push("\\'"):str.substr(i,1)=="\r"?buf.push(" "):str.substr(i,1)=="\n"?(buf.push("\\n"),lineno++):buf.push(str.substr(i,1));buf.push("');\n}\nreturn buf.join('');");return buf.join("")},compile=exports.compile=function(str,options){options=options||{};var input=JSON.stringify(str),filename=options.filename?JSON.stringify(options.filename):"undefined";str=["var __stack = { lineno: 1, input: "+input+", filename: "+filename+" };",rethrow.toString(),"try {",exports.parse(str,options),"} catch (err) {"," rethrow(err, __stack.input, __stack.filename, __stack.lineno);","}"].join("\n"),options.debug&&console.log(str);var fn=new Function("locals, filters, escape",str);return function(locals){return fn.call(this,locals,filters,utils.escape)}};exports.render=function(str,options){var fn,options=options||{};if(options.cache)if(options.filename)fn=cache[options.filename]||(cache[options.filename]=compile(str,options));else throw new Error('"cache" option requires "filename".');else fn=compile(str,options);options.__proto__=options.locals;return fn.call(options.scope,options)},exports.renderFile=function(path,options,fn){var key=path+":string";"function"==typeof options&&(fn=options,options={}),options.filename=path;try{var str=options.cache?exports.cache[key]||(exports.cache[key]=fs.readFileSync(path,"utf8")):fs.readFileSync(path,"utf8");fn(null,exports.render(str,options))}catch(err){fn(err)}},exports.__express=exports.renderFile,require.extensions?require.extensions[".ejs"]=function(module,filename){source=require("fs").readFileSync(filename,"utf-8"),module._compile(compile(source,{}),filename)}:require.registerExtension&&require.registerExtension(".ejs",function(src){return compile(src,{})})}),require.register("filters.js",function(module,exports,require){exports.first=function(obj){return obj[0]},exports.last=function(obj){return obj[obj.length-1]},exports.capitalize=function(str){str=String(str);return str[0].toUpperCase()+str.substr(1,str.length)},exports.downcase=function(str){return String(str).toLowerCase()},exports.upcase=function(str){return String(str).toUpperCase()},exports.sort=function(obj){return Object.create(obj).sort()},exports.sort_by=function(obj,prop){return Object.create(obj).sort(function(a,b){a=a[prop],b=b[prop];if(a>b)return 1;if(a<b)return-1;return 0})},exports.size=exports.length=function(obj){return obj.length},exports.plus=function(a,b){return Number(a)+Number(b)},exports.minus=function(a,b){return Number(a)-Number(b)},exports.times=function(a,b){return Number(a)*Number(b)},exports.divided_by=function(a,b){return Number(a)/Number(b)},exports.join=function(obj,str){return obj.join(str||", ")},exports.truncate=function(str,len){str=String(str);return str.substr(0,len)},exports.truncate_words=function(str,n){var str=String(str),words=str.split(/ +/);return words.slice(0,n).join(" ")},exports.replace=function(str,pattern,substitution){return String(str).replace(pattern,substitution||"")},exports.prepend=function(obj,val){return Array.isArray(obj)?[val].concat(obj):val+obj},exports.append=function(obj,val){return Array.isArray(obj)?obj.concat(val):obj+val},exports.map=function(arr,prop){return arr.map(function(obj){return obj[prop]})},exports.reverse=function(obj){return Array.isArray(obj)?obj.reverse():String(obj).split("").reverse().join("")},exports.get=function(obj,prop){return obj[prop]},exports.json=function(obj){return JSON.stringify(obj)}}),require.register("utils.js",function(module,exports,require){exports.escape=function(html){return String(html).replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}}) \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/examples/client.html b/tools/blog/node_modules/ejs/examples/client.html
deleted file mode 100644
index 51ce0b4ced..0000000000
--- a/tools/blog/node_modules/ejs/examples/client.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
- <head>
- <script src="../ejs.js"></script>
- <script id="users" type="text/template">
- <% if (names.length) { %>
- <ul>
- <% names.forEach(function(name){ %>
- <li><%= name %></li>
- <% }) %>
- </ul>
- <% } %>
- </script>
- <script>
- onload = function(){
- var users = document.getElementById('users').innerHTML;
- var names = ['loki', 'tobi', 'jane'];
- var html = require('ejs').render(users, { names: names });
- document.body.innerHTML = html;
- }
- </script>
- </head>
- <body>
- </body>
-</html> \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/examples/list.ejs b/tools/blog/node_modules/ejs/examples/list.ejs
deleted file mode 100644
index d571330aee..0000000000
--- a/tools/blog/node_modules/ejs/examples/list.ejs
+++ /dev/null
@@ -1,7 +0,0 @@
-<% if (names.length) { %>
- <ul>
- <% names.forEach(function(name){ %>
- <li><%= name %></li>
- <% }) %>
- </ul>
-<% } %> \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/examples/list.js b/tools/blog/node_modules/ejs/examples/list.js
deleted file mode 100644
index ec614ed624..0000000000
--- a/tools/blog/node_modules/ejs/examples/list.js
+++ /dev/null
@@ -1,14 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var ejs = require('../')
- , fs = require('fs')
- , str = fs.readFileSync(__dirname + '/list.ejs', 'utf8');
-
-var ret = ejs.render(str, {
- names: ['foo', 'bar', 'baz']
-});
-
-console.log(ret); \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/index.js b/tools/blog/node_modules/ejs/index.js
deleted file mode 100644
index 20bf71a3fc..0000000000
--- a/tools/blog/node_modules/ejs/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-module.exports = require('./lib/ejs'); \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/lib/ejs.js b/tools/blog/node_modules/ejs/lib/ejs.js
deleted file mode 100644
index e87b98ea55..0000000000
--- a/tools/blog/node_modules/ejs/lib/ejs.js
+++ /dev/null
@@ -1,298 +0,0 @@
-
-/*!
- * EJS
- * Copyright(c) 2012 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Module dependencies.
- */
-
-var utils = require('./utils')
- , fs = require('fs');
-
-/**
- * Library version.
- */
-
-exports.version = '0.7.1';
-
-/**
- * Filters.
- *
- * @type Object
- */
-
-var filters = exports.filters = require('./filters');
-
-/**
- * Intermediate js cache.
- *
- * @type Object
- */
-
-var cache = {};
-
-/**
- * Clear intermediate js cache.
- *
- * @api public
- */
-
-exports.clearCache = function(){
- cache = {};
-};
-
-/**
- * Translate filtered code into function calls.
- *
- * @param {String} js
- * @return {String}
- * @api private
- */
-
-function filtered(js) {
- return js.substr(1).split('|').reduce(function(js, filter){
- var parts = filter.split(':')
- , name = parts.shift()
- , args = parts.shift() || '';
- if (args) args = ', ' + args;
- return 'filters.' + name + '(' + js + args + ')';
- });
-};
-
-/**
- * Re-throw the given `err` in context to the
- * `str` of ejs, `filename`, and `lineno`.
- *
- * @param {Error} err
- * @param {String} str
- * @param {String} filename
- * @param {String} lineno
- * @api private
- */
-
-function rethrow(err, str, filename, lineno){
- var lines = str.split('\n')
- , start = Math.max(lineno - 3, 0)
- , end = Math.min(lines.length, lineno + 3);
-
- // Error context
- var context = lines.slice(start, end).map(function(line, i){
- var curr = i + start + 1;
- return (curr == lineno ? ' >> ' : ' ')
- + curr
- + '| '
- + line;
- }).join('\n');
-
- // Alter exception message
- err.path = filename;
- err.message = (filename || 'ejs') + ':'
- + lineno + '\n'
- + context + '\n\n'
- + err.message;
-
- throw err;
-}
-
-/**
- * Parse the given `str` of ejs, returning the function body.
- *
- * @param {String} str
- * @return {String}
- * @api public
- */
-
-var parse = exports.parse = function(str, options){
- var options = options || {}
- , open = options.open || exports.open || '<%'
- , close = options.close || exports.close || '%>';
-
- var buf = [
- "var buf = [];"
- , "\nwith (locals) {"
- , "\n buf.push('"
- ];
-
- var lineno = 1;
-
- var consumeEOL = false;
- for (var i = 0, len = str.length; i < len; ++i) {
- if (str.slice(i, open.length + i) == open) {
- i += open.length
-
- var prefix, postfix, line = '__stack.lineno=' + lineno;
- switch (str.substr(i, 1)) {
- case '=':
- prefix = "', escape((" + line + ', ';
- postfix = ")), '";
- ++i;
- break;
- case '-':
- prefix = "', (" + line + ', ';
- postfix = "), '";
- ++i;
- break;
- default:
- prefix = "');" + line + ';';
- postfix = "; buf.push('";
- }
-
- var end = str.indexOf(close, i)
- , js = str.substring(i, end)
- , start = i
- , n = 0;
-
- if ('-' == js[js.length-1]){
- js = js.substring(0, js.length - 2);
- consumeEOL = true;
- }
-
- while (~(n = js.indexOf("\n", n))) n++, lineno++;
- if (js.substr(0, 1) == ':') js = filtered(js);
- buf.push(prefix, js, postfix);
- i += end - start + close.length - 1;
-
- } else if (str.substr(i, 1) == "\\") {
- buf.push("\\\\");
- } else if (str.substr(i, 1) == "'") {
- buf.push("\\'");
- } else if (str.substr(i, 1) == "\r") {
- buf.push(" ");
- } else if (str.substr(i, 1) == "\n") {
- if (consumeEOL) {
- consumeEOL = false;
- } else {
- buf.push("\\n");
- lineno++;
- }
- } else {
- buf.push(str.substr(i, 1));
- }
- }
-
- buf.push("');\n}\nreturn buf.join('');");
- return buf.join('');
-};
-
-/**
- * Compile the given `str` of ejs into a `Function`.
- *
- * @param {String} str
- * @param {Object} options
- * @return {Function}
- * @api public
- */
-
-var compile = exports.compile = function(str, options){
- options = options || {};
-
- var input = JSON.stringify(str)
- , filename = options.filename
- ? JSON.stringify(options.filename)
- : 'undefined';
-
- // Adds the fancy stack trace meta info
- str = [
- 'var __stack = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
- rethrow.toString(),
- 'try {',
- exports.parse(str, options),
- '} catch (err) {',
- ' rethrow(err, __stack.input, __stack.filename, __stack.lineno);',
- '}'
- ].join("\n");
-
- if (options.debug) console.log(str);
- var fn = new Function('locals, filters, escape', str);
- return function(locals){
- return fn.call(this, locals, filters, utils.escape);
- }
-};
-
-/**
- * Render the given `str` of ejs.
- *
- * Options:
- *
- * - `locals` Local variables object
- * - `cache` Compiled functions are cached, requires `filename`
- * - `filename` Used by `cache` to key caches
- * - `scope` Function execution context
- * - `debug` Output generated function body
- * - `open` Open tag, defaulting to "<%"
- * - `close` Closing tag, defaulting to "%>"
- *
- * @param {String} str
- * @param {Object} options
- * @return {String}
- * @api public
- */
-
-exports.render = function(str, options){
- var fn
- , options = options || {};
-
- if (options.cache) {
- if (options.filename) {
- fn = cache[options.filename] || (cache[options.filename] = compile(str, options));
- } else {
- throw new Error('"cache" option requires "filename".');
- }
- } else {
- fn = compile(str, options);
- }
-
- options.__proto__ = options.locals;
- return fn.call(options.scope, options);
-};
-
-/**
- * Render an EJS file at the given `path` and callback `fn(err, str)`.
- *
- * @param {String} path
- * @param {Object|Function} options or callback
- * @param {Function} fn
- * @api public
- */
-
-exports.renderFile = function(path, options, fn){
- var key = path + ':string';
-
- if ('function' == typeof options) {
- fn = options, options = {};
- }
-
- options.filename = path;
-
- try {
- var str = options.cache
- ? cache[key] || (cache[key] = fs.readFileSync(path, 'utf8'))
- : fs.readFileSync(path, 'utf8');
-
- fn(null, exports.render(str, options));
- } catch (err) {
- fn(err);
- }
-};
-
-// express support
-
-exports.__express = exports.renderFile;
-
-/**
- * Expose to require().
- */
-
-if (require.extensions) {
- require.extensions['.ejs'] = function(module, filename) {
- source = require('fs').readFileSync(filename, 'utf-8');
- module._compile(compile(source, {}), filename);
- };
-} else if (require.registerExtension) {
- require.registerExtension('.ejs', function(src) {
- return compile(src, {});
- });
-}
diff --git a/tools/blog/node_modules/ejs/lib/filters.js b/tools/blog/node_modules/ejs/lib/filters.js
deleted file mode 100644
index d425c8d89e..0000000000
--- a/tools/blog/node_modules/ejs/lib/filters.js
+++ /dev/null
@@ -1,198 +0,0 @@
-
-/*!
- * EJS - Filters
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * First element of the target `obj`.
- */
-
-exports.first = function(obj) {
- return obj[0];
-};
-
-/**
- * Last element of the target `obj`.
- */
-
-exports.last = function(obj) {
- return obj[obj.length - 1];
-};
-
-/**
- * Capitalize the first letter of the target `str`.
- */
-
-exports.capitalize = function(str){
- str = String(str);
- return str[0].toUpperCase() + str.substr(1, str.length);
-};
-
-/**
- * Downcase the target `str`.
- */
-
-exports.downcase = function(str){
- return String(str).toLowerCase();
-};
-
-/**
- * Uppercase the target `str`.
- */
-
-exports.upcase = function(str){
- return String(str).toUpperCase();
-};
-
-/**
- * Sort the target `obj`.
- */
-
-exports.sort = function(obj){
- return Object.create(obj).sort();
-};
-
-/**
- * Sort the target `obj` by the given `prop` ascending.
- */
-
-exports.sort_by = function(obj, prop){
- return Object.create(obj).sort(function(a, b){
- a = a[prop], b = b[prop];
- if (a > b) return 1;
- if (a < b) return -1;
- return 0;
- });
-};
-
-/**
- * Size or length of the target `obj`.
- */
-
-exports.size = exports.length = function(obj) {
- return obj.length;
-};
-
-/**
- * Add `a` and `b`.
- */
-
-exports.plus = function(a, b){
- return Number(a) + Number(b);
-};
-
-/**
- * Subtract `b` from `a`.
- */
-
-exports.minus = function(a, b){
- return Number(a) - Number(b);
-};
-
-/**
- * Multiply `a` by `b`.
- */
-
-exports.times = function(a, b){
- return Number(a) * Number(b);
-};
-
-/**
- * Divide `a` by `b`.
- */
-
-exports.divided_by = function(a, b){
- return Number(a) / Number(b);
-};
-
-/**
- * Join `obj` with the given `str`.
- */
-
-exports.join = function(obj, str){
- return obj.join(str || ', ');
-};
-
-/**
- * Truncate `str` to `len`.
- */
-
-exports.truncate = function(str, len){
- str = String(str);
- return str.substr(0, len);
-};
-
-/**
- * Truncate `str` to `n` words.
- */
-
-exports.truncate_words = function(str, n){
- var str = String(str)
- , words = str.split(/ +/);
- return words.slice(0, n).join(' ');
-};
-
-/**
- * Replace `pattern` with `substitution` in `str`.
- */
-
-exports.replace = function(str, pattern, substitution){
- return String(str).replace(pattern, substitution || '');
-};
-
-/**
- * Prepend `val` to `obj`.
- */
-
-exports.prepend = function(obj, val){
- return Array.isArray(obj)
- ? [val].concat(obj)
- : val + obj;
-};
-
-/**
- * Append `val` to `obj`.
- */
-
-exports.append = function(obj, val){
- return Array.isArray(obj)
- ? obj.concat(val)
- : obj + val;
-};
-
-/**
- * Map the given `prop`.
- */
-
-exports.map = function(arr, prop){
- return arr.map(function(obj){
- return obj[prop];
- });
-};
-
-/**
- * Reverse the given `obj`.
- */
-
-exports.reverse = function(obj){
- return Array.isArray(obj)
- ? obj.reverse()
- : String(obj).split('').reverse().join('');
-};
-
-/**
- * Get `prop` of the given `obj`.
- */
-
-exports.get = function(obj, prop){
- return obj[prop];
-};
-
-/**
- * Packs the given `obj` into json string
- */
-exports.json = function(obj){
- return JSON.stringify(obj);
-}; \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/lib/utils.js b/tools/blog/node_modules/ejs/lib/utils.js
deleted file mode 100644
index 8d569d6f23..0000000000
--- a/tools/blog/node_modules/ejs/lib/utils.js
+++ /dev/null
@@ -1,23 +0,0 @@
-
-/*!
- * EJS
- * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
- * MIT Licensed
- */
-
-/**
- * Escape the given string of `html`.
- *
- * @param {String} html
- * @return {String}
- * @api private
- */
-
-exports.escape = function(html){
- return String(html)
- .replace(/&(?!\w+;)/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/"/g, '&quot;');
-};
- \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/package.json b/tools/blog/node_modules/ejs/package.json
deleted file mode 100644
index 0458a44465..0000000000
--- a/tools/blog/node_modules/ejs/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "ejs",
- "description": "Embedded JavaScript templates",
- "version": "0.7.1",
- "author": {
- "name": "TJ Holowaychuk",
- "email": "tj@vision-media.ca"
- },
- "keywords": [
- "template",
- "engine",
- "ejs"
- ],
- "devDependencies": {
- "mocha": "*"
- },
- "main": "./lib/ejs.js",
- "_id": "ejs@0.7.1",
- "dist": {
- "shasum": "9ed557b7e65f9f1adf5473060d079141ad7e680b"
- },
- "_from": "ejs"
-}
diff --git a/tools/blog/node_modules/ejs/support/compile.js b/tools/blog/node_modules/ejs/support/compile.js
deleted file mode 100644
index 95cafc88d0..0000000000
--- a/tools/blog/node_modules/ejs/support/compile.js
+++ /dev/null
@@ -1,174 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var fs = require('fs');
-
-/**
- * Arguments.
- */
-
-var args = process.argv.slice(2)
- , pending = args.length
- , files = {};
-
-console.log('');
-
-// parse arguments
-
-args.forEach(function(file){
- var mod = file.replace('lib/', '');
- fs.readFile(file, 'utf8', function(err, js){
- if (err) throw err;
- console.log(' \033[90mcompile : \033[0m\033[36m%s\033[0m', file);
- files[file] = parse(js);
- --pending || compile();
- });
-});
-
-/**
- * Parse the given `js`.
- */
-
-function parse(js) {
- return parseInheritance(parseConditionals(js));
-}
-
-/**
- * Parse __proto__.
- */
-
-function parseInheritance(js) {
- return js
- .replace(/^ *(\w+)\.prototype\.__proto__ * = *(\w+)\.prototype *;?/gm, function(_, child, parent){
- return child + '.prototype = new ' + parent + ';\n'
- + child + '.prototype.constructor = '+ child + ';\n';
- });
-}
-
-/**
- * Parse the given `js`, currently supporting:
- *
- * 'if' ['node' | 'browser']
- * 'end'
- *
- */
-
-function parseConditionals(js) {
- var lines = js.split('\n')
- , len = lines.length
- , buffer = true
- , browser = false
- , buf = []
- , line
- , cond;
-
- for (var i = 0; i < len; ++i) {
- line = lines[i];
- if (/^ *\/\/ *if *(node|browser)/gm.exec(line)) {
- cond = RegExp.$1;
- buffer = browser = 'browser' == cond;
- } else if (/^ *\/\/ *end/.test(line)) {
- buffer = true;
- browser = false;
- } else if (browser) {
- buf.push(line.replace(/^( *)\/\//, '$1'));
- } else if (buffer) {
- buf.push(line);
- }
- }
-
- return buf.join('\n');
-}
-
-/**
- * Compile the files.
- */
-
-function compile() {
- var buf = '';
- buf += '\n// CommonJS require()\n\n';
- buf += browser.require + '\n\n';
- buf += 'require.modules = {};\n\n';
- buf += 'require.resolve = ' + browser.resolve + ';\n\n';
- buf += 'require.register = ' + browser.register + ';\n\n';
- buf += 'require.relative = ' + browser.relative + ';\n\n';
- args.forEach(function(file){
- var js = files[file];
- file = file.replace('lib/', '');
- buf += '\nrequire.register("' + file + '", function(module, exports, require){\n';
- buf += js;
- buf += '\n}); // module: ' + file + '\n';
- });
- fs.writeFile('ejs.js', buf, function(err){
- if (err) throw err;
- console.log(' \033[90m create : \033[0m\033[36m%s\033[0m', 'ejs.js');
- console.log();
- });
-}
-
-// refactored version of weepy's
-// https://github.com/weepy/brequire/blob/master/browser/brequire.js
-
-var browser = {
-
- /**
- * Require a module.
- */
-
- require: function require(p){
- if ('fs' == p) return {};
- var path = require.resolve(p)
- , mod = require.modules[path];
- if (!mod) throw new Error('failed to require "' + p + '"');
- if (!mod.exports) {
- mod.exports = {};
- mod.call(mod.exports, mod, mod.exports, require.relative(path));
- }
- return mod.exports;
- },
-
- /**
- * Resolve module path.
- */
-
- resolve: function(path){
- var orig = path
- , reg = path + '.js'
- , index = path + '/index.js';
- return require.modules[reg] && reg
- || require.modules[index] && index
- || orig;
- },
-
- /**
- * Return relative require().
- */
-
- relative: function(parent) {
- return function(p){
- if ('.' != p.substr(0, 1)) return require(p);
-
- var path = parent.split('/')
- , segs = p.split('/');
- path.pop();
-
- for (var i = 0; i < segs.length; i++) {
- var seg = segs[i];
- if ('..' == seg) path.pop();
- else if ('.' != seg) path.push(seg);
- }
-
- return require(path.join('/'));
- };
- },
-
- /**
- * Register a module.
- */
-
- register: function(path, fn){
- require.modules[path] = fn;
- }
-}; \ No newline at end of file
diff --git a/tools/blog/node_modules/ejs/test/ejs.test.js b/tools/blog/node_modules/ejs/test/ejs.test.js
deleted file mode 100644
index 54b8d2dacc..0000000000
--- a/tools/blog/node_modules/ejs/test/ejs.test.js
+++ /dev/null
@@ -1,329 +0,0 @@
-
-/**
- * Module dependencies.
- */
-
-var ejs = require('../')
- , assert = require('assert');
-
-module.exports = {
- 'test .version': function(){
- assert.ok(/^\d+\.\d+\.\d+$/.test(ejs.version), 'Test .version format');
- },
-
- 'test html': function(){
- assert.equal('<p>yay</p>', ejs.render('<p>yay</p>'));
- },
-
- 'test renderFile': function(){
- var html = '<h1>tj</h1>',
- str = '<p><%= name %></p>',
- options = { name: 'tj', open: '{', close: '}' };
-
- ejs.renderFile(__dirname + '/fixtures/user.ejs', options, function(err, res){
- assert.ok(!err);
- assert.equal(res, html);
- })
- },
-
- 'test buffered code': function(){
- var html = '<p>tj</p>',
- str = '<p><%= name %></p>',
- locals = { name: 'tj' };
- assert.equal(html, ejs.render(str, { locals: locals }));
- },
-
- 'test unbuffered code': function(){
- var html = '<p>tj</p>',
- str = '<% if (name) { %><p><%= name %></p><% } %>',
- locals = { name: 'tj' };
- assert.equal(html, ejs.render(str, { locals: locals }));
- },
-
- 'test `scope` option': function(){
- var html = '<p>tj</p>',
- str = '<p><%= this %></p>';
- assert.equal(html, ejs.render(str, { scope: 'tj' }));
- },
-
- 'test escaping': function(){
- assert.equal('&lt;script&gt;', ejs.render('<%= "<script>" %>'));
- assert.equal('<script>', ejs.render('<%- "<script>" %>'));
- },
-
- 'test newlines': function(){
- var html = '\n<p>tj</p>\n<p>tj@sencha.com</p>',
- str = '<% if (name) { %>\n<p><%= name %></p>\n<p><%= email %></p><% } %>',
- locals = { name: 'tj', email: 'tj@sencha.com' };
- assert.equal(html, ejs.render(str, { locals: locals }));
- },
-
- 'test single quotes': function(){
- var html = '<p>WAHOO</p>',
- str = "<p><%= up('wahoo') %></p>",
- locals = { up: function(str){ return str.toUpperCase(); }};
- assert.equal(html, ejs.render(str, { locals: locals }));
- },
-
- 'test single quotes in the html': function(){
- var html = '<p>WAHOO that\'s cool</p>',
- str = '<p><%= up(\'wahoo\') %> that\'s cool</p>',
- locals = { up: function(str){ return str.toUpperCase(); }};
- assert.equal(html, ejs.render(str, { locals: locals }));
- },
-
- 'test multiple single quotes': function() {
- var html = "<p>couldn't shouldn't can't</p>",
- str = "<p>couldn't shouldn't can't</p>";
- assert.equal(html, ejs.render(str));
- },
-
- 'test single quotes inside tags': function() {
- var html = '<p>string</p>',
- str = "<p><%= 'string' %></p>";
- assert.equal(html, ejs.render(str));
- },
-
- 'test back-slashes in the document': function() {
- var html = "<p>backslash: '\\'</p>",
- str = "<p>backslash: '\\'</p>";
- assert.equal(html, ejs.render(str));
- },
-
- 'test double quotes': function(){
- var html = '<p>WAHOO</p>',
- str = '<p><%= up("wahoo") %></p>',
- locals = { up: function(str){ return str.toUpperCase(); }};
- assert.equal(html, ejs.render(str, { locals: locals }));
- },
-
- 'test multiple double quotes': function() {
- var html = '<p>just a "test" wahoo</p>',
- str = '<p>just a "test" wahoo</p>';
- assert.equal(html, ejs.render(str));
- },
-
- 'test pass options as locals': function(){
- var html = '<p>foo</p>',
- str = '<p><%="foo"%></p>';
- assert.equal(html, ejs.render(str));
-
- var html = '<p>foo</p>',
- str = '<p><%=bar%></p>';
- assert.equal(html, ejs.render(str, { bar: 'foo' }));
- },
-
- 'test whitespace': function(){
- var html = '<p>foo</p>',
- str = '<p><%="foo"%></p>';
- assert.equal(html, ejs.render(str));
-
- var html = '<p>foo</p>',
- str = '<p><%=bar%></p>';
- assert.equal(html, ejs.render(str, { locals: { bar: 'foo' }}));
- },
-
- 'test custom tags': function(){
- var html = '<p>foo</p>',
- str = '<p>{{= "foo" }}</p>';
-
- assert.equal(html, ejs.render(str, {
- open: '{{',
- close: '}}'
- }));
-
- var html = '<p>foo</p>',
- str = '<p><?= "foo" ?></p>';
-
- assert.equal(html, ejs.render(str, {
- open: '<?',
- close: '?>'
- }));
- },
-
- 'test custom tags over 2 chars': function(){
- var html = '<p>foo</p>',
- str = '<p>{{{{= "foo" }>>}</p>';
-
- assert.equal(html, ejs.render(str, {
- open: '{{{{',
- close: '}>>}'
- }));
-
- var html = '<p>foo</p>',
- str = '<p><??= "foo" ??></p>';
-
- assert.equal(html, ejs.render(str, {
- open: '<??',
- close: '??>'
- }));
- },
-
- 'test global custom tags': function(){
- var html = '<p>foo</p>',
- str = '<p>{{= "foo" }}</p>';
- ejs.open = '{{';
- ejs.close = '}}';
- assert.equal(html, ejs.render(str));
- delete ejs.open;
- delete ejs.close;
- },
-
- 'test iteration': function(){
- var html = '<p>foo</p>',
- str = '<% for (var key in items) { %>'
- + '<p><%= items[key] %></p>'
- + '<% } %>';
- assert.equal(html, ejs.render(str, {
- locals: {
- items: ['foo']
- }
- }));
-
- var html = '<p>foo</p>',
- str = '<% items.forEach(function(item){ %>'
- + '<p><%= item %></p>'
- + '<% }) %>';
- assert.equal(html, ejs.render(str, {
- locals: {
- items: ['foo']
- }
- }));
- },
-
- 'test filter support': function(){
- var html = 'Zab',
- str = '<%=: items | reverse | first | reverse | capitalize %>';
- assert.equal(html, ejs.render(str, {
- locals: {
- items: ['foo', 'bar', 'baz']
- }
- }));
- },
-
- 'test filter argument support': function(){
- var html = 'tj, guillermo',
- str = '<%=: users | map:"name" | join:", " %>';
- assert.equal(html, ejs.render(str, {
- locals: {
- users: [
- { name: 'tj' },
- { name: 'guillermo' }
- ]
- }
- }));
- },
-
- 'test sort_by filter': function(){
- var html = 'tj',
- str = '<%=: users | sort_by:"name" | last | get:"name" %>';
- assert.equal(html, ejs.render(str, {
- locals: {
- users: [
- { name: 'guillermo' },
- { name: 'tj' },
- { name: 'mape' }
- ]
- }
- }));
- },
-
- 'test custom filters': function(){
- var html = 'Welcome Tj Holowaychuk',
- str = '<%=: users | first | greeting %>';
-
- ejs.filters.greeting = function(user){
- return 'Welcome ' + user.first + ' ' + user.last + '';
- };
-
- assert.equal(html, ejs.render(str, {
- locals: {
- users: [
- { first: 'Tj', last: 'Holowaychuk' }
- ]
- }
- }));
- },
-
- 'test useful stack traces': function(){
- var str = [
- "A little somethin'",
- "somethin'",
- "<% if (name) { %>", // Failing line
- " <p><%= name %></p>",
- " <p><%= email %></p>",
- "<% } %>"
- ].join("\n");
-
- try {
- ejs.render(str)
- } catch (err) {
- assert.ok(~err.message.indexOf("name is not defined"));
- assert.deepEqual(err.name, "ReferenceError");
- var lineno = parseInt(err.toString().match(/ejs:(\d+)\n/)[1]);
- assert.deepEqual(lineno,3, "Error should been thrown on line 3, was thrown on line "+lineno);
- }
- },
-
- 'test useful stack traces multiline': function(){
- var str = [
- "A little somethin'",
- "somethin'",
- "<% var some = 'pretty';",
- " var multiline = 'javascript';",
- "%>",
- "<% if (name) { %>", // Failing line
- " <p><%= name %></p>",
- " <p><%= email %></p>",
- "<% } %>"
- ].join("\n");
-
- try {
- ejs.render(str)
- } catch (err) {
- assert.ok(~err.message.indexOf("name is not defined"));
- assert.deepEqual(err.name, "ReferenceError");
- var lineno = parseInt(err.toString().match(/ejs:(\d+)\n/)[1]);
- assert.deepEqual(lineno, 6, "Error should been thrown on line 3, was thrown on line "+lineno);
- }
- },
-
- 'test slurp' : function() {
- var expected = 'me\nhere',
- str = 'me<% %>\nhere';
- assert.equal(expected, ejs.render(str));
-
- var expected = 'mehere',
- str = 'me<% -%>\nhere';
- assert.equal(expected, ejs.render(str));
-
- var expected = 'me\nhere',
- str = 'me<% -%>\n\nhere';
- assert.equal(expected, ejs.render(str));
-
- var expected = 'me inbetween \nhere',
- str = 'me <%= x %> \nhere';
- assert.equal(expected, ejs.render(str,{x:'inbetween'}));
-
- var expected = 'me inbetween here',
- str = 'me <%= x -%> \nhere';
- assert.equal(expected, ejs.render(str,{x:'inbetween'}));
-
- var expected = 'me <p>inbetween</p> here',
- str = 'me <%- x -%> \nhere';
- assert.equal(expected, ejs.render(str,{x:'<p>inbetween</p>'}));
-
- var expected = '\n Hallo 0\n\n Hallo 1\n\n',
- str = '<% for(var i in [1,2]) { %>\n' +
- ' Hallo <%= i %>\n' +
- '<% } %>\n';
- assert.equal(expected, ejs.render(str));
-
- var expected = ' Hallo 0\n Hallo 1\n',
- str = '<% for(var i in [1,2]) { -%>\n' +
- ' Hallo <%= i %>\n' +
- '<% } -%>\n';
- assert.equal(expected, ejs.render(str));
- }
-
-};
diff --git a/tools/blog/node_modules/ejs/test/fixtures/user.ejs b/tools/blog/node_modules/ejs/test/fixtures/user.ejs
deleted file mode 100644
index b312b5daa5..0000000000
--- a/tools/blog/node_modules/ejs/test/fixtures/user.ejs
+++ /dev/null
@@ -1 +0,0 @@
-<h1>{= name}</h1> \ No newline at end of file
diff --git a/tools/blog/node_modules/glob/.npmignore b/tools/blog/node_modules/glob/.npmignore
deleted file mode 100644
index 2af4b71c93..0000000000
--- a/tools/blog/node_modules/glob/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.*.swp
-test/a/
diff --git a/tools/blog/node_modules/glob/.travis.yml b/tools/blog/node_modules/glob/.travis.yml
deleted file mode 100644
index 94cd7f6ba2..0000000000
--- a/tools/blog/node_modules/glob/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.6
- - 0.7
diff --git a/tools/blog/node_modules/glob/LICENCE b/tools/blog/node_modules/glob/LICENCE
deleted file mode 100644
index 74489e2e26..0000000000
--- a/tools/blog/node_modules/glob/LICENCE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) Isaac Z. Schlueter
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/blog/node_modules/glob/LICENSE b/tools/blog/node_modules/glob/LICENSE
deleted file mode 100644
index 0c44ae716d..0000000000
--- a/tools/blog/node_modules/glob/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Isaac Z. Schlueter ("Author")
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/blog/node_modules/glob/README.md b/tools/blog/node_modules/glob/README.md
deleted file mode 100644
index 6e27df6206..0000000000
--- a/tools/blog/node_modules/glob/README.md
+++ /dev/null
@@ -1,233 +0,0 @@
-# Glob
-
-This is a glob implementation in JavaScript. It uses the `minimatch`
-library to do its matching.
-
-## Attention: node-glob users!
-
-The API has changed dramatically between 2.x and 3.x. This library is
-now 100% JavaScript, and the integer flags have been replaced with an
-options object.
-
-Also, there's an event emitter class, proper tests, and all the other
-things you've come to expect from node modules.
-
-And best of all, no compilation!
-
-## Usage
-
-```javascript
-var glob = require("glob")
-
-// options is optional
-glob("**/*.js", options, function (er, files) {
- // files is an array of filenames.
- // If the `nonull` option is set, and nothing
- // was found, then files is ["**/*.js"]
- // er is an error object or null.
-})
-```
-
-## Features
-
-Please see the [minimatch
-documentation](https://github.com/isaacs/minimatch) for more details.
-
-Supports these glob features:
-
-* Brace Expansion
-* Extended glob matching
-* "Globstar" `**` matching
-
-See:
-
-* `man sh`
-* `man bash`
-* `man 3 fnmatch`
-* `man 5 gitignore`
-* [minimatch documentation](https://github.com/isaacs/minimatch)
-
-## glob(pattern, [options], cb)
-
-* `pattern` {String} Pattern to be matched
-* `options` {Object}
-* `cb` {Function}
- * `err` {Error | null}
- * `matches` {Array<String>} filenames found matching the pattern
-
-Perform an asynchronous glob search.
-
-## glob.sync(pattern, [options]
-
-* `pattern` {String} Pattern to be matched
-* `options` {Object}
-* return: {Array<String>} filenames found matching the pattern
-
-Perform a synchronous glob search.
-
-## Class: glob.Glob
-
-Create a Glob object by instanting the `glob.Glob` class.
-
-```javascript
-var Glob = require("glob").Glob
-var mg = new Glob(pattern, options, cb)
-```
-
-It's an EventEmitter, and starts walking the filesystem to find matches
-immediately.
-
-### new glob.Glob(pattern, [options], [cb])
-
-* `pattern` {String} pattern to search for
-* `options` {Object}
-* `cb` {Function} Called when an error occurs, or matches are found
- * `err` {Error | null}
- * `matches` {Array<String>} filenames found matching the pattern
-
-Note that if the `sync` flag is set in the options, then matches will
-be immediately available on the `g.found` member.
-
-### Properties
-
-* `minimatch` The minimatch object that the glob uses.
-* `options` The options object passed in.
-* `error` The error encountered. When an error is encountered, the
- glob object is in an undefined state, and should be discarded.
-* `aborted` Boolean which is set to true when calling `abort()`. There
- is no way at this time to continue a glob search after aborting, but
- you can re-use the statCache to avoid having to duplicate syscalls.
-
-### Events
-
-* `end` When the matching is finished, this is emitted with all the
- matches found. If the `nonull` option is set, and no match was found,
- then the `matches` list contains the original pattern. The matches
- are sorted, unless the `nosort` flag is set.
-* `match` Every time a match is found, this is emitted with the matched.
-* `error` Emitted when an unexpected error is encountered, or whenever
- any fs error occurs if `options.strict` is set.
-* `abort` When `abort()` is called, this event is raised.
-
-### Methods
-
-* `abort` Stop the search.
-
-### Options
-
-All the options that can be passed to Minimatch can also be passed to
-Glob to change pattern matching behavior. Also, some have been added,
-or have glob-specific ramifications.
-
-All options are false by default, unless otherwise noted.
-
-All options are added to the glob object, as well.
-
-* `cwd` The current working directory in which to search. Defaults
- to `process.cwd()`.
-* `root` The place where patterns starting with `/` will be mounted
- onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
- systems, and `C:\` or some such on Windows.)
-* `nomount` By default, a pattern starting with a forward-slash will be
- "mounted" onto the root setting, so that a valid filesystem path is
- returned. Set this flag to disable that behavior.
-* `mark` Add a `/` character to directory matches. Note that this
- requires additional stat calls.
-* `nosort` Don't sort the results.
-* `stat` Set to true to stat *all* results. This reduces performance
- somewhat, and is completely unnecessary, unless `readdir` is presumed
- to be an untrustworthy indicator of file existence. It will cause
- ELOOP to be triggered one level sooner in the case of cyclical
- symbolic links.
-* `silent` When an unusual error is encountered
- when attempting to read a directory, a warning will be printed to
- stderr. Set the `silent` option to true to suppress these warnings.
-* `strict` When an unusual error is encountered
- when attempting to read a directory, the process will just continue on
- in search of other matches. Set the `strict` option to raise an error
- in these cases.
-* `statCache` A cache of results of filesystem information, to prevent
- unnecessary stat calls. While it should not normally be necessary to
- set this, you may pass the statCache from one glob() call to the
- options object of another, if you know that the filesystem will not
- change between calls. (See "Race Conditions" below.)
-* `sync` Perform a synchronous glob search.
-* `nounique` In some cases, brace-expanded patterns can result in the
- same file showing up multiple times in the result set. By default,
- this implementation prevents duplicates in the result set.
- Set this flag to disable that behavior.
-* `nonull` Set to never return an empty set, instead returning a set
- containing the pattern itself. This is the default in glob(3).
-* `nocase` Perform a case-insensitive match. Note that case-insensitive
- filesystems will sometimes result in glob returning results that are
- case-insensitively matched anyway, since readdir and stat will not
- raise an error.
-* `debug` Set to enable debug logging in minimatch and glob.
-* `globDebug` Set to enable debug logging in glob, but not minimatch.
-
-## Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between node-glob and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.1, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not. **Note that this is different from the way that `**` is
-handled by ruby's `Dir` class.**
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then glob returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
-
-## Windows
-
-**Please only use forward-slashes in glob expressions.**
-
-Though windows uses either `/` or `\` as its path separator, only `/`
-characters are used by this glob implementation. You must use
-forward-slashes **only** in glob expressions. Back-slashes will always
-be interpreted as escape characters, not path separators.
-
-Results from absolute patterns such as `/foo/*` are mounted onto the
-root setting using `path.join`. On windows, this will by default result
-in `/foo/*` matching `C:\foo\bar.txt`.
-
-## Race Conditions
-
-Glob searching, by its very nature, is susceptible to race conditions,
-since it relies on directory walking and such.
-
-As a result, it is possible that a file that exists when glob looks for
-it may have been deleted or modified by the time it returns the result.
-
-As part of its internal implementation, this program caches all stat
-and readdir calls that it makes, in order to cut down on system
-overhead. However, this also makes it even more susceptible to races,
-especially if the statCache object is reused between glob calls.
-
-Users are thus advised not to use a glob result as a
-guarantee of filesystem state in the face of rapid changes.
-For the vast majority of operations, this is never a problem.
diff --git a/tools/blog/node_modules/glob/examples/g.js b/tools/blog/node_modules/glob/examples/g.js
deleted file mode 100644
index be122df002..0000000000
--- a/tools/blog/node_modules/glob/examples/g.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var Glob = require("../").Glob
-
-var pattern = "test/a/**/[cg]/../[cg]"
-console.log(pattern)
-
-var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
- console.log("matches", matches)
-})
-console.log("after")
diff --git a/tools/blog/node_modules/glob/examples/usr-local.js b/tools/blog/node_modules/glob/examples/usr-local.js
deleted file mode 100644
index 327a425e47..0000000000
--- a/tools/blog/node_modules/glob/examples/usr-local.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var Glob = require("../").Glob
-
-var pattern = "{./*/*,/*,/usr/local/*}"
-console.log(pattern)
-
-var mg = new Glob(pattern, {mark: true}, function (er, matches) {
- console.log("matches", matches)
-})
-console.log("after")
diff --git a/tools/blog/node_modules/glob/glob.js b/tools/blog/node_modules/glob/glob.js
deleted file mode 100644
index 0e7135842c..0000000000
--- a/tools/blog/node_modules/glob/glob.js
+++ /dev/null
@@ -1,601 +0,0 @@
-// Approach:
-//
-// 1. Get the minimatch set
-// 2. For each pattern in the set, PROCESS(pattern)
-// 3. Store matches per-set, then uniq them
-//
-// PROCESS(pattern)
-// Get the first [n] items from pattern that are all strings
-// Join these together. This is PREFIX.
-// If there is no more remaining, then stat(PREFIX) and
-// add to matches if it succeeds. END.
-// readdir(PREFIX) as ENTRIES
-// If fails, END
-// If pattern[n] is GLOBSTAR
-// // handle the case where the globstar match is empty
-// // by pruning it out, and testing the resulting pattern
-// PROCESS(pattern[0..n] + pattern[n+1 .. $])
-// // handle other cases.
-// for ENTRY in ENTRIES (not dotfiles)
-// // attach globstar + tail onto the entry
-// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
-//
-// else // not globstar
-// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
-// Test ENTRY against pattern[n+1]
-// If fails, continue
-// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
-//
-// Caveat:
-// Cache all stats and readdirs results to minimize syscall. Since all
-// we ever care about is existence and directory-ness, we can just keep
-// `true` for files, and [children,...] for directories, or `false` for
-// things that don't exist.
-
-
-
-module.exports = glob
-
-var fs = require("graceful-fs")
-, minimatch = require("minimatch")
-, Minimatch = minimatch.Minimatch
-, inherits = require("inherits")
-, EE = require("events").EventEmitter
-, path = require("path")
-, isDir = {}
-, assert = require("assert").ok
-, EOF = {}
-
-function glob (pattern, options, cb) {
- if (typeof options === "function") cb = options, options = {}
- if (!options) options = {}
-
- if (typeof options === "number") {
- deprecated()
- return
- }
-
- var g = new Glob(pattern, options, cb)
- return g.sync ? g.found : g
-}
-
-glob.fnmatch = deprecated
-
-function deprecated () {
- throw new Error("glob's interface has changed. Please see the docs.")
-}
-
-glob.sync = globSync
-function globSync (pattern, options) {
- if (typeof options === "number") {
- deprecated()
- return
- }
-
- options = options || {}
- options.sync = true
- return glob(pattern, options)
-}
-
-
-glob.Glob = Glob
-inherits(Glob, EE)
-function Glob (pattern, options, cb) {
- if (!(this instanceof Glob)) {
- return new Glob(pattern, options, cb)
- }
-
- if (typeof cb === "function") {
- this.on("error", cb)
- this.on("end", function (matches) {
- // console.error("cb with matches", matches)
- cb(null, matches)
- })
- }
-
- options = options || {}
-
- this.maxDepth = options.maxDepth || 1000
- this.maxLength = options.maxLength || Infinity
- this.statCache = options.statCache || {}
-
- this.changedCwd = false
- var cwd = process.cwd()
- if (!options.hasOwnProperty("cwd")) this.cwd = cwd
- else {
- this.cwd = options.cwd
- this.changedCwd = path.resolve(options.cwd) !== cwd
- }
-
- this.root = options.root || path.resolve(this.cwd, "/")
- this.root = path.resolve(this.root)
-
- this.nomount = !!options.nomount
-
- if (!pattern) {
- throw new Error("must provide pattern")
- }
-
- // base-matching: just use globstar for that.
- if (options.matchBase && -1 === pattern.indexOf("/")) {
- if (options.noglobstar) {
- throw new Error("base matching requires globstar")
- }
- pattern = "**/" + pattern
- }
-
- this.dot = !!options.dot
- this.mark = !!options.mark
- this.sync = !!options.sync
- this.nounique = !!options.nounique
- this.nonull = !!options.nonull
- this.nosort = !!options.nosort
- this.nocase = !!options.nocase
- this.stat = !!options.stat
- this.debug = !!options.debug || !!options.globDebug
- this.silent = !!options.silent
-
- var mm = this.minimatch = new Minimatch(pattern, options)
- this.options = mm.options
- pattern = this.pattern = mm.pattern
-
- this.error = null
- this.aborted = false
-
- EE.call(this)
-
- // process each pattern in the minimatch set
- var n = this.minimatch.set.length
-
- // The matches are stored as {<filename>: true,...} so that
- // duplicates are automagically pruned.
- // Later, we do an Object.keys() on these.
- // Keep them as a list so we can fill in when nonull is set.
- this.matches = new Array(n)
-
- this.minimatch.set.forEach(iterator.bind(this))
- function iterator (pattern, i, set) {
- this._process(pattern, 0, i, function (er) {
- if (er) this.emit("error", er)
- if (-- n <= 0) this._finish()
- })
- }
-}
-
-Glob.prototype._finish = function () {
- assert(this instanceof Glob)
-
- var nou = this.nounique
- , all = nou ? [] : {}
-
- for (var i = 0, l = this.matches.length; i < l; i ++) {
- var matches = this.matches[i]
- if (this.debug) console.error("matches[%d] =", i, matches)
- // do like the shell, and spit out the literal glob
- if (!matches) {
- if (this.nonull) {
- var literal = this.minimatch.globSet[i]
- if (nou) all.push(literal)
- else nou[literal] = true
- }
- } else {
- // had matches
- var m = Object.keys(matches)
- if (nou) all.push.apply(all, m)
- else m.forEach(function (m) {
- all[m] = true
- })
- }
- }
-
- if (!nou) all = Object.keys(all)
-
- if (!this.nosort) {
- all = all.sort(this.nocase ? alphasorti : alphasort)
- }
-
- if (this.mark) {
- // at *some* point we statted all of these
- all = all.map(function (m) {
- var sc = this.statCache[m]
- if (!sc) return m
- if (m.slice(-1) !== "/" && (Array.isArray(sc) || sc === 2)) {
- return m + "/"
- }
- if (m.slice(-1) === "/") {
- return m.replace(/\/$/, "")
- }
- return m
- }, this)
- }
-
- if (this.debug) console.error("emitting end", all)
-
- EOF = this.found = all
- this.emitMatch(EOF)
-}
-
-function alphasorti (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return alphasort(a, b)
-}
-
-function alphasort (a, b) {
- return a > b ? 1 : a < b ? -1 : 0
-}
-
-Glob.prototype.abort = function () {
- this.aborted = true
- this.emit("abort")
-}
-
-Glob.prototype.pause = function () {
- if (this.paused) return
- if (this.sync)
- this.emit("error", new Error("Can't pause/resume sync glob"))
- this.paused = true
- this.emit("pause")
-}
-
-Glob.prototype.resume = function () {
- if (!this.paused) return
- if (this.sync)
- this.emit("error", new Error("Can't pause/resume sync glob"))
- this.paused = false
- this.emit("resume")
-}
-
-
-Glob.prototype.emitMatch = function (m) {
- if (!this.paused) {
- this.emit(m === EOF ? "end" : "match", m)
- return
- }
-
- if (!this._emitQueue) {
- this._emitQueue = []
- this.once("resume", function () {
- var q = this._emitQueue
- this._emitQueue = null
- q.forEach(function (m) {
- this.emitMatch(m)
- }, this)
- })
- }
-
- this._emitQueue.push(m)
-
- //this.once("resume", this.emitMatch.bind(this, m))
-}
-
-
-
-Glob.prototype._process = function (pattern, depth, index, cb_) {
- assert(this instanceof Glob)
-
- var cb = function cb (er, res) {
- assert(this instanceof Glob)
- if (this.paused) {
- if (!this._processQueue) {
- this._processQueue = []
- this.once("resume", function () {
- var q = this._processQueue
- this._processQueue = null
- q.forEach(function (cb) { cb() })
- })
- }
- this._processQueue.push(cb_.bind(this, er, res))
- } else {
- cb_.call(this, er, res)
- }
- }.bind(this)
-
- if (this.aborted) return cb()
-
- if (depth > this.maxDepth) return cb()
-
- // Get the first [n] parts of pattern that are all strings.
- var n = 0
- while (typeof pattern[n] === "string") {
- n ++
- }
- // now n is the index of the first one that is *not* a string.
-
- // see if there's anything else
- var prefix
- switch (n) {
- // if not, then this is rather simple
- case pattern.length:
- prefix = pattern.join("/")
- this._stat(prefix, function (exists, isDir) {
- // either it's there, or it isn't.
- // nothing more to do, either way.
- if (exists) {
- if (prefix.charAt(0) === "/" && !this.nomount) {
- prefix = path.join(this.root, prefix)
- }
- this.matches[index] = this.matches[index] || {}
- this.matches[index][prefix] = true
- this.emitMatch(prefix)
- }
- return cb()
- })
- return
-
- case 0:
- // pattern *starts* with some non-trivial item.
- // going to readdir(cwd), but not include the prefix in matches.
- prefix = null
- break
-
- default:
- // pattern has some string bits in the front.
- // whatever it starts with, whether that's "absolute" like /foo/bar,
- // or "relative" like "../baz"
- prefix = pattern.slice(0, n)
- prefix = prefix.join("/")
- break
- }
-
- // get the list of entries.
- var read
- if (prefix === null) read = "."
- else if (isAbsolute(prefix)) {
- read = prefix = path.join("/", prefix)
- if (this.debug) console.error('absolute: ', prefix, this.root, pattern)
- } else read = prefix
-
- if (this.debug) console.error('readdir(%j)', read, this.cwd, this.root)
- return this._readdir(read, function (er, entries) {
- if (er) {
- // not a directory!
- // this means that, whatever else comes after this, it can never match
- return cb()
- }
-
- // globstar is special
- if (pattern[n] === minimatch.GLOBSTAR) {
- // test without the globstar, and with every child both below
- // and replacing the globstar.
- var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
- entries.forEach(function (e) {
- if (e.charAt(0) === "." && !this.dot) return
- // instead of the globstar
- s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
- // below the globstar
- s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
- }, this)
-
- // now asyncForEach over this
- var l = s.length
- , errState = null
- s.forEach(function (gsPattern) {
- this._process(gsPattern, depth + 1, index, function (er) {
- if (errState) return
- if (er) return cb(errState = er)
- if (--l <= 0) return cb()
- })
- }, this)
-
- return
- }
-
- // not a globstar
- // It will only match dot entries if it starts with a dot, or if
- // dot is set. Stuff like @(.foo|.bar) isn't allowed.
- var pn = pattern[n]
- if (typeof pn === "string") {
- var found = entries.indexOf(pn) !== -1
- entries = found ? entries[pn] : []
- } else {
- var rawGlob = pattern[n]._glob
- , dotOk = this.dot || rawGlob.charAt(0) === "."
-
- entries = entries.filter(function (e) {
- return (e.charAt(0) !== "." || dotOk) &&
- (typeof pattern[n] === "string" && e === pattern[n] ||
- e.match(pattern[n]))
- })
- }
-
- // If n === pattern.length - 1, then there's no need for the extra stat
- // *unless* the user has specified "mark" or "stat" explicitly.
- // We know that they exist, since the readdir returned them.
- if (n === pattern.length - 1 &&
- !this.mark &&
- !this.stat) {
- entries.forEach(function (e) {
- if (prefix) {
- if (prefix !== "/") e = prefix + "/" + e
- else e = prefix + e
- }
- if (e.charAt(0) === "/" && !this.nomount) {
- e = path.join(this.root, e)
- }
-
- this.matches[index] = this.matches[index] || {}
- this.matches[index][e] = true
- this.emitMatch(e)
- }, this)
- return cb.call(this)
- }
-
-
- // now test all the remaining entries as stand-ins for that part
- // of the pattern.
- var l = entries.length
- , errState = null
- if (l === 0) return cb() // no matches possible
- entries.forEach(function (e) {
- var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
- this._process(p, depth + 1, index, function (er) {
- if (errState) return
- if (er) return cb(errState = er)
- if (--l === 0) return cb.call(this)
- })
- }, this)
- })
-
-}
-
-Glob.prototype._stat = function (f, cb) {
- assert(this instanceof Glob)
- var abs = f
- if (f.charAt(0) === "/") {
- abs = path.join(this.root, f)
- } else if (this.changedCwd) {
- abs = path.resolve(this.cwd, f)
- }
- if (this.debug) console.error('stat', [this.cwd, f, '=', abs])
- if (f.length > this.maxLength) {
- var er = new Error("Path name too long")
- er.code = "ENAMETOOLONG"
- er.path = f
- return this._afterStat(f, abs, cb, er)
- }
-
- if (this.statCache.hasOwnProperty(f)) {
- var exists = this.statCache[f]
- , isDir = exists && (Array.isArray(exists) || exists === 2)
- if (this.sync) return cb.call(this, !!exists, isDir)
- return process.nextTick(cb.bind(this, !!exists, isDir))
- }
-
- if (this.sync) {
- var er, stat
- try {
- stat = fs.statSync(abs)
- } catch (e) {
- er = e
- }
- this._afterStat(f, abs, cb, er, stat)
- } else {
- fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
- }
-}
-
-Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
- var exists
- assert(this instanceof Glob)
- if (er || !stat) {
- exists = false
- } else {
- exists = stat.isDirectory() ? 2 : 1
- }
- this.statCache[f] = this.statCache[f] || exists
- cb.call(this, !!exists, exists === 2)
-}
-
-Glob.prototype._readdir = function (f, cb) {
- assert(this instanceof Glob)
- var abs = f
- if (f.charAt(0) === "/") {
- abs = path.join(this.root, f)
- } else if (isAbsolute(f)) {
- abs = f
- } else if (this.changedCwd) {
- abs = path.resolve(this.cwd, f)
- }
-
- if (this.debug) console.error('readdir', [this.cwd, f, abs])
- if (f.length > this.maxLength) {
- var er = new Error("Path name too long")
- er.code = "ENAMETOOLONG"
- er.path = f
- return this._afterReaddir(f, abs, cb, er)
- }
-
- if (this.statCache.hasOwnProperty(f)) {
- var c = this.statCache[f]
- if (Array.isArray(c)) {
- if (this.sync) return cb.call(this, null, c)
- return process.nextTick(cb.bind(this, null, c))
- }
-
- if (!c || c === 1) {
- // either ENOENT or ENOTDIR
- var code = c ? "ENOTDIR" : "ENOENT"
- , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
- er.path = f
- er.code = code
- if (this.debug) console.error(f, er)
- if (this.sync) return cb.call(this, er)
- return process.nextTick(cb.bind(this, er))
- }
-
- // at this point, c === 2, meaning it's a dir, but we haven't
- // had to read it yet, or c === true, meaning it's *something*
- // but we don't have any idea what. Need to read it, either way.
- }
-
- if (this.sync) {
- var er, entries
- try {
- entries = fs.readdirSync(abs)
- } catch (e) {
- er = e
- }
- return this._afterReaddir(f, abs, cb, er, entries)
- }
-
- fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
-}
-
-Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
- assert(this instanceof Glob)
- if (entries && !er) {
- this.statCache[f] = entries
- // if we haven't asked to stat everything for suresies, then just
- // assume that everything in there exists, so we can avoid
- // having to stat it a second time. This also gets us one step
- // further into ELOOP territory.
- if (!this.mark && !this.stat) {
- entries.forEach(function (e) {
- if (f === "/") e = f + e
- else e = f + "/" + e
- this.statCache[e] = true
- }, this)
- }
-
- return cb.call(this, er, entries)
- }
-
- // now handle errors, and cache the information
- if (er) switch (er.code) {
- case "ENOTDIR": // totally normal. means it *does* exist.
- this.statCache[f] = 1
- return cb.call(this, er)
- case "ENOENT": // not terribly unusual
- case "ELOOP":
- case "ENAMETOOLONG":
- case "UNKNOWN":
- this.statCache[f] = false
- return cb.call(this, er)
- default: // some unusual error. Treat as failure.
- this.statCache[f] = false
- if (this.strict) this.emit("error", er)
- if (!this.silent) console.error("glob error", er)
- return cb.call(this, er)
- }
-}
-
-var isAbsolute = process.platform === "win32" ? absWin : absUnix
-
-function absWin (p) {
- if (absUnix(p)) return true
- // pull off the device/UNC bit from a windows path.
- // from node's lib/path.js
- var splitDeviceRe =
- /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/
- , result = splitDeviceRe.exec(p)
- , device = result[1] || ''
- , isUnc = device && device.charAt(1) !== ':'
- , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
-
- return isAbsolute
-}
-
-function absUnix (p) {
- return p.charAt(0) === "/" || p === ""
-}
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore b/tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore
deleted file mode 100644
index c2658d7d1b..0000000000
--- a/tools/blog/node_modules/glob/node_modules/graceful-fs/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE b/tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE
deleted file mode 100644
index 05a4010949..0000000000
--- a/tools/blog/node_modules/glob/node_modules/graceful-fs/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
-All rights reserved.
-
-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.
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/README.md b/tools/blog/node_modules/glob/node_modules/graceful-fs/README.md
deleted file mode 100644
index 7d2e681e32..0000000000
--- a/tools/blog/node_modules/glob/node_modules/graceful-fs/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Just like node's `fs` module, but it does an incremental back-off when
-EMFILE is encountered.
-
-Useful in asynchronous situations where one needs to try to open lots
-and lots of files.
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
deleted file mode 100644
index ecbda31a5a..0000000000
--- a/tools/blog/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
+++ /dev/null
@@ -1,275 +0,0 @@
-// this keeps a queue of opened file descriptors, and will make
-// fs operations wait until some have closed before trying to open more.
-
-var fs = require("fs")
-
-// there is such a thing as TOO graceful.
-if (fs.open === gracefulOpen) return
-
-var queue = []
- , curOpen = 0
- , constants = require("constants")
-
-
-exports = module.exports = fs
-
-
-fs.MIN_MAX_OPEN = 64
-fs.MAX_OPEN = 1024
-
-var originalOpen = fs.open
- , originalOpenSync = fs.openSync
- , originalClose = fs.close
- , originalCloseSync = fs.closeSync
-
-
-// prevent EMFILE errors
-function OpenReq (path, flags, mode, cb) {
- this.path = path
- this.flags = flags
- this.mode = mode
- this.cb = cb
-}
-
-function noop () {}
-
-fs.open = gracefulOpen
-
-function gracefulOpen (path, flags, mode, cb) {
- if (typeof mode === "function") cb = mode, mode = null
- if (typeof cb !== "function") cb = noop
-
- if (curOpen >= fs.MAX_OPEN) {
- queue.push(new OpenReq(path, flags, mode, cb))
- setTimeout(flush)
- return
- }
- open(path, flags, mode, function (er, fd) {
- if (er && er.code === "EMFILE" && curOpen > fs.MIN_MAX_OPEN) {
- // that was too many. reduce max, get back in queue.
- // this should only happen once in a great while, and only
- // if the ulimit -n is set lower than 1024.
- fs.MAX_OPEN = curOpen - 1
- return fs.open(path, flags, mode, cb)
- }
- cb(er, fd)
- })
-}
-
-function open (path, flags, mode, cb) {
- cb = cb || noop
- curOpen ++
- originalOpen.call(fs, path, flags, mode, function (er, fd) {
- if (er) {
- onclose()
- }
-
- cb(er, fd)
- })
-}
-
-fs.openSync = function (path, flags, mode) {
- curOpen ++
- return originalOpenSync.call(fs, path, flags, mode)
-}
-
-function onclose () {
- curOpen --
- flush()
-}
-
-function flush () {
- while (curOpen < fs.MAX_OPEN) {
- var req = queue.shift()
- if (!req) break
- open(req.path, req.flags || "r", req.mode || 0777, req.cb)
- }
- if (queue.length === 0) return
-}
-
-fs.close = function (fd, cb) {
- cb = cb || noop
- originalClose.call(fs, fd, function (er) {
- onclose()
- cb(er)
- })
-}
-
-fs.closeSync = function (fd) {
- onclose()
- return originalCloseSync.call(fs, fd)
-}
-
-
-// (re-)implement some things that are known busted or missing.
-
-var constants = require("constants")
-
-// lchmod, broken prior to 0.6.2
-// back-port the fix here.
-if (constants.hasOwnProperty('O_SYMLINK') &&
- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
- fs.lchmod = function (path, mode, callback) {
- callback = callback || noop
- fs.open( path
- , constants.O_WRONLY | constants.O_SYMLINK
- , mode
- , function (err, fd) {
- if (err) {
- callback(err)
- return
- }
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- fs.fchmod(fd, mode, function (err) {
- fs.close(fd, function(err2) {
- callback(err || err2)
- })
- })
- })
- }
-
- fs.lchmodSync = function (path, mode) {
- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
-
- // prefer to return the chmod error, if one occurs,
- // but still try to close, and report closing errors if they occur.
- var err, err2
- try {
- var ret = fs.fchmodSync(fd, mode)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-}
-
-
-// lstat on windows, missing from early 0.5 versions
-// replacing with stat isn't quite perfect, but good enough to get by.
-if (process.platform === "win32" && !process.binding("fs").lstat) {
- fs.lstat = fs.stat
- fs.lstatSync = fs.statSync
-}
-
-
-// lutimes implementation, or no-op
-if (!fs.lutimes) {
- if (constants.hasOwnProperty("O_SYMLINK")) {
- fs.lutimes = function (path, at, mt, cb) {
- fs.open(path, constants.O_SYMLINK, function (er, fd) {
- cb = cb || noop
- if (er) return cb(er)
- fs.futimes(fd, at, mt, function (er) {
- fs.close(fd, function (er2) {
- return cb(er || er2)
- })
- })
- })
- }
-
- fs.lutimesSync = function (path, at, mt) {
- var fd = fs.openSync(path, constants.O_SYMLINK)
- , err
- , err2
- , ret
-
- try {
- var ret = fs.futimesSync(fd, at, mt)
- } catch (er) {
- err = er
- }
- try {
- fs.closeSync(fd)
- } catch (er) {
- err2 = er
- }
- if (err || err2) throw (err || err2)
- return ret
- }
-
- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
- // maybe utimensat will be bound soonish?
- fs.lutimes = function (path, at, mt, cb) {
- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
- }
-
- fs.lutimesSync = function (path, at, mt) {
- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
- }
-
- } else {
- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
- fs.lutimesSync = function () {}
- }
-}
-
-
-// https://github.com/isaacs/node-graceful-fs/issues/4
-// Chown should not fail on einval or eperm if non-root.
-
-fs.chown = chownFix(fs.chown)
-fs.fchown = chownFix(fs.fchown)
-fs.lchown = chownFix(fs.lchown)
-
-fs.chownSync = chownFixSync(fs.chownSync)
-fs.fchownSync = chownFixSync(fs.fchownSync)
-fs.lchownSync = chownFixSync(fs.lchownSync)
-
-function chownFix (orig) {
- if (!orig) return orig
- return function (target, uid, gid, cb) {
- return orig.call(fs, target, uid, gid, function (er, res) {
- if (chownErOk(er)) er = null
- cb(er, res)
- })
- }
-}
-
-function chownFixSync (orig) {
- if (!orig) return orig
- return function (target, uid, gid) {
- try {
- return orig.call(fs, target, uid, gid)
- } catch (er) {
- if (!chownErOk(er)) throw er
- }
- }
-}
-
-function chownErOk (er) {
- // if there's no getuid, or if getuid() is something other than 0,
- // and the error is EINVAL or EPERM, then just ignore it.
- // This specific case is a silent failure in cp, install, tar,
- // and most other unix tools that manage permissions.
- // When running as root, or if other types of errors are encountered,
- // then it's strict.
- if (!er || (!process.getuid || process.getuid() !== 0)
- && (er.code === "EINVAL" || er.code === "EPERM")) return true
-}
-
-
-
-// on Windows, A/V software can lock the directory, causing this
-// to fail with an EACCES or EPERM if the directory contains newly
-// created files. Try again on failure, for up to 1 second.
-if (process.platform === "win32") {
- var rename_ = fs.rename
- fs.rename = function rename (from, to, cb) {
- var start = Date.now()
- rename_(from, to, function CB (er) {
- if (er
- && (er.code === "EACCES" || er.code === "EPERM")
- && Date.now() - start < 1000) {
- return rename_(from, to, CB)
- }
- cb(er)
- })
- }
-}
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/package.json b/tools/blog/node_modules/glob/node_modules/graceful-fs/package.json
deleted file mode 100644
index 36f358483e..0000000000
--- a/tools/blog/node_modules/glob/node_modules/graceful-fs/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "name": "graceful-fs",
- "description": "Just like node's `fs` module, but it does an incremental back-off when EMFILE is encountered.",
- "version": "1.1.8",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-graceful-fs.git"
- },
- "main": "graceful-fs.js",
- "engines": {
- "node": ">=0.4.0"
- },
- "devDependencies": {},
- "readme": "Just like node's `fs` module, but it does an incremental back-off when\nEMFILE is encountered.\n\nUseful in asynchronous situations where one needs to try to open lots\nand lots of files.\n",
- "_id": "graceful-fs@1.1.8",
- "_from": "graceful-fs@~1.1.2"
-}
diff --git a/tools/blog/node_modules/glob/node_modules/graceful-fs/test/open.js b/tools/blog/node_modules/glob/node_modules/graceful-fs/test/open.js
deleted file mode 100644
index d05f880c86..0000000000
--- a/tools/blog/node_modules/glob/node_modules/graceful-fs/test/open.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var test = require('tap').test
-var fs = require('../graceful-fs.js')
-
-test('open an existing file works', function (t) {
- var start = fs._curOpen
- var fd = fs.openSync(__filename, 'r')
- t.equal(fs._curOpen, start + 1)
- fs.closeSync(fd)
- t.equal(fs._curOpen, start)
- fs.open(__filename, 'r', function (er, fd) {
- if (er) throw er
- t.equal(fs._curOpen, start + 1)
- fs.close(fd, function (er) {
- if (er) throw er
- t.equal(fs._curOpen, start)
- t.end()
- })
- })
-})
-
-test('open a non-existing file throws', function (t) {
- var start = fs._curOpen
- var er
- try {
- var fd = fs.openSync('this file does not exist', 'r')
- } catch (x) {
- er = x
- }
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.equal(fs._curOpen, start)
-
- fs.open('neither does this file', 'r', function (er, fd) {
- t.ok(er, 'should throw')
- t.notOk(fd, 'should not get an fd')
- t.equal(er.code, 'ENOENT')
- t.equal(fs._curOpen, start)
- t.end()
- })
-})
diff --git a/tools/blog/node_modules/glob/node_modules/inherits/README.md b/tools/blog/node_modules/glob/node_modules/inherits/README.md
deleted file mode 100644
index b2beaed93a..0000000000
--- a/tools/blog/node_modules/glob/node_modules/inherits/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-A dead simple way to do inheritance in JS.
-
- var inherits = require("inherits")
-
- function Animal () {
- this.alive = true
- }
- Animal.prototype.say = function (what) {
- console.log(what)
- }
-
- inherits(Dog, Animal)
- function Dog () {
- Dog.super.apply(this)
- }
- Dog.prototype.sniff = function () {
- this.say("sniff sniff")
- }
- Dog.prototype.bark = function () {
- this.say("woof woof")
- }
-
- inherits(Chihuahua, Dog)
- function Chihuahua () {
- Chihuahua.super.apply(this)
- }
- Chihuahua.prototype.bark = function () {
- this.say("yip yip")
- }
-
- // also works
- function Cat () {
- Cat.super.apply(this)
- }
- Cat.prototype.hiss = function () {
- this.say("CHSKKSS!!")
- }
- inherits(Cat, Animal, {
- meow: function () { this.say("miao miao") }
- })
- Cat.prototype.purr = function () {
- this.say("purr purr")
- }
-
-
- var c = new Chihuahua
- assert(c instanceof Chihuahua)
- assert(c instanceof Dog)
- assert(c instanceof Animal)
-
-The actual function is laughably small. 10-lines small.
diff --git a/tools/blog/node_modules/glob/node_modules/inherits/inherits.js b/tools/blog/node_modules/glob/node_modules/inherits/inherits.js
deleted file mode 100644
index 061b396207..0000000000
--- a/tools/blog/node_modules/glob/node_modules/inherits/inherits.js
+++ /dev/null
@@ -1,29 +0,0 @@
-module.exports = inherits
-
-function inherits (c, p, proto) {
- proto = proto || {}
- var e = {}
- ;[c.prototype, proto].forEach(function (s) {
- Object.getOwnPropertyNames(s).forEach(function (k) {
- e[k] = Object.getOwnPropertyDescriptor(s, k)
- })
- })
- c.prototype = Object.create(p.prototype, e)
- c.super = p
-}
-
-//function Child () {
-// Child.super.call(this)
-// console.error([this
-// ,this.constructor
-// ,this.constructor === Child
-// ,this.constructor.super === Parent
-// ,Object.getPrototypeOf(this) === Child.prototype
-// ,Object.getPrototypeOf(Object.getPrototypeOf(this))
-// === Parent.prototype
-// ,this instanceof Child
-// ,this instanceof Parent])
-//}
-//function Parent () {}
-//inherits(Child, Parent)
-//new Child
diff --git a/tools/blog/node_modules/glob/node_modules/inherits/package.json b/tools/blog/node_modules/glob/node_modules/inherits/package.json
deleted file mode 100644
index 6435eb6e6b..0000000000
--- a/tools/blog/node_modules/glob/node_modules/inherits/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "inherits",
- "description": "A dead simple way to do inheritance in JS.",
- "version": "1.0.0",
- "keywords": [
- "inheritance",
- "class",
- "klass",
- "oop",
- "object-oriented"
- ],
- "main": "./inherits.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/isaacs/inherits"
- },
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "readme": "A dead simple way to do inheritance in JS.\n\n var inherits = require(\"inherits\")\n\n function Animal () {\n this.alive = true\n }\n Animal.prototype.say = function (what) {\n console.log(what)\n }\n\n inherits(Dog, Animal)\n function Dog () {\n Dog.super.apply(this)\n }\n Dog.prototype.sniff = function () {\n this.say(\"sniff sniff\")\n }\n Dog.prototype.bark = function () {\n this.say(\"woof woof\")\n }\n\n inherits(Chihuahua, Dog)\n function Chihuahua () {\n Chihuahua.super.apply(this)\n }\n Chihuahua.prototype.bark = function () {\n this.say(\"yip yip\")\n }\n\n // also works\n function Cat () {\n Cat.super.apply(this)\n }\n Cat.prototype.hiss = function () {\n this.say(\"CHSKKSS!!\")\n }\n inherits(Cat, Animal, {\n meow: function () { this.say(\"miao miao\") }\n })\n Cat.prototype.purr = function () {\n this.say(\"purr purr\")\n }\n\n\n var c = new Chihuahua\n assert(c instanceof Chihuahua)\n assert(c instanceof Dog)\n assert(c instanceof Animal)\n\nThe actual function is laughably small. 10-lines small.\n",
- "_id": "inherits@1.0.0",
- "_from": "inherits@1"
-}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml b/tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml
deleted file mode 100644
index f1d0f13c8a..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.4
- - 0.6
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/LICENSE b/tools/blog/node_modules/glob/node_modules/minimatch/LICENSE
deleted file mode 100644
index 05a4010949..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
-All rights reserved.
-
-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.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/README.md b/tools/blog/node_modules/glob/node_modules/minimatch/README.md
deleted file mode 100644
index 6fd07d2e97..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/README.md
+++ /dev/null
@@ -1,218 +0,0 @@
-# minimatch
-
-A minimal matching utility.
-
-[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)
-
-
-This is the matching library used internally by npm.
-
-Eventually, it will replace the C binding in node-glob.
-
-It works by converting glob expressions into JavaScript `RegExp`
-objects.
-
-## Usage
-
-```javascript
-var minimatch = require("minimatch")
-
-minimatch("bar.foo", "*.foo") // true!
-minimatch("bar.foo", "*.bar") // false!
-```
-
-## Features
-
-Supports these glob features:
-
-* Brace Expansion
-* Extended glob matching
-* "Globstar" `**` matching
-
-See:
-
-* `man sh`
-* `man bash`
-* `man 3 fnmatch`
-* `man 5 gitignore`
-
-### Comparisons to other fnmatch/glob implementations
-
-While strict compliance with the existing standards is a worthwhile
-goal, some discrepancies exist between minimatch and other
-implementations, and are intentional.
-
-If the pattern starts with a `!` character, then it is negated. Set the
-`nonegate` flag to suppress this behavior, and treat leading `!`
-characters normally. This is perhaps relevant if you wish to start the
-pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
-characters at the start of a pattern will negate the pattern multiple
-times.
-
-If a pattern starts with `#`, then it is treated as a comment, and
-will not match anything. Use `\#` to match a literal `#` at the
-start of a line, or set the `nocomment` flag to suppress this behavior.
-
-The double-star character `**` is supported by default, unless the
-`noglobstar` flag is set. This is supported in the manner of bsdglob
-and bash 4.1, where `**` only has special significance if it is the only
-thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
-`a/**b` will not. **Note that this is different from the way that `**` is
-handled by ruby's `Dir` class.**
-
-If an escaped pattern has no matches, and the `nonull` flag is set,
-then minimatch.match returns the pattern as-provided, rather than
-interpreting the character escapes. For example,
-`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
-`"*a?"`. This is akin to setting the `nullglob` option in bash, except
-that it does not resolve escaped pattern characters.
-
-If brace expansion is not disabled, then it is performed before any
-other interpretation of the glob pattern. Thus, a pattern like
-`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
-**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
-checked for validity. Since those two are valid, matching proceeds.
-
-
-## Minimatch Class
-
-Create a minimatch object by instanting the `minimatch.Minimatch` class.
-
-```javascript
-var Minimatch = require("minimatch").Minimatch
-var mm = new Minimatch(pattern, options)
-```
-
-### Properties
-
-* `pattern` The original pattern the minimatch object represents.
-* `options` The options supplied to the constructor.
-* `set` A 2-dimensional array of regexp or string expressions.
- Each row in the
- array corresponds to a brace-expanded pattern. Each item in the row
- corresponds to a single path-part. For example, the pattern
- `{a,b/c}/d` would expand to a set of patterns like:
-
- [ [ a, d ]
- , [ b, c, d ] ]
-
- If a portion of the pattern doesn't have any "magic" in it
- (that is, it's something like `"foo"` rather than `fo*o?`), then it
- will be left as a string rather than converted to a regular
- expression.
-
-* `regexp` Created by the `makeRe` method. A single regular expression
- expressing the entire pattern. This is useful in cases where you wish
- to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
-* `negate` True if the pattern is negated.
-* `comment` True if the pattern is a comment.
-* `empty` True if the pattern is `""`.
-
-### Methods
-
-* `makeRe` Generate the `regexp` member if necessary, and return it.
- Will return `false` if the pattern is invalid.
-* `match(fname)` Return true if the filename matches the pattern, or
- false otherwise.
-* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
- filename, and match it against a single row in the `regExpSet`. This
- method is mainly for internal use, but is exposed so that it can be
- used by a glob-walker that needs to avoid excessive filesystem calls.
-
-All other methods are internal, and will be called as necessary.
-
-## Functions
-
-The top-level exported function has a `cache` property, which is an LRU
-cache set to store 100 items. So, calling these methods repeatedly
-with the same pattern and options will use the same Minimatch object,
-saving the cost of parsing it multiple times.
-
-### minimatch(path, pattern, options)
-
-Main export. Tests a path against the pattern using the options.
-
-```javascript
-var isJS = minimatch(file, "*.js", { matchBase: true })
-```
-
-### minimatch.filter(pattern, options)
-
-Returns a function that tests its
-supplied argument, suitable for use with `Array.filter`. Example:
-
-```javascript
-var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
-```
-
-### minimatch.match(list, pattern, options)
-
-Match against the list of
-files, in the style of fnmatch or glob. If nothing is matched, and
-options.nonull is set, then return a list containing the pattern itself.
-
-```javascript
-var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
-```
-
-### minimatch.makeRe(pattern, options)
-
-Make a regular expression object from the pattern.
-
-## Options
-
-All options are `false` by default.
-
-### debug
-
-Dump a ton of stuff to stderr.
-
-### nobrace
-
-Do not expand `{a,b}` and `{1..3}` brace sets.
-
-### noglobstar
-
-Disable `**` matching against multiple folder names.
-
-### dot
-
-Allow patterns to match filenames starting with a period, even if
-the pattern does not explicitly have a period in that spot.
-
-Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
-is set.
-
-### noext
-
-Disable "extglob" style patterns like `+(a|b)`.
-
-### nocase
-
-Perform a case-insensitive match.
-
-### nonull
-
-When a match is not found by `minimatch.match`, return a list containing
-the pattern itself. When set, an empty list is returned if there are
-no matches.
-
-### matchBase
-
-If set, then patterns without slashes will be matched
-against the basename of the path if it contains slashes. For example,
-`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
-
-### nocomment
-
-Suppress the behavior of treating `#` at the start of a pattern as a
-comment.
-
-### nonegate
-
-Suppress the behavior of treating a leading `!` character as negation.
-
-### flipNegate
-
-Returns from negate expressions the same as if they were not negated.
-(Ie, true on a hit, false on a miss.)
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js b/tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js
deleted file mode 100644
index 00873594b5..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/minimatch.js
+++ /dev/null
@@ -1,1052 +0,0 @@
-;(function (require, exports, module, platform) {
-
-if (module) module.exports = minimatch
-else exports.minimatch = minimatch
-
-if (!require) {
- require = function (id) {
- switch (id) {
- case "path": return { basename: function (f) {
- f = f.split(/[\/\\]/)
- var e = f.pop()
- if (!e) e = f.pop()
- return e
- }}
- case "lru-cache": return function LRUCache () {
- // not quite an LRU, but still space-limited.
- var cache = {}
- var cnt = 0
- this.set = function (k, v) {
- cnt ++
- if (cnt >= 100) cache = {}
- cache[k] = v
- }
- this.get = function (k) { return cache[k] }
- }
- }
- }
-}
-
-minimatch.Minimatch = Minimatch
-
-var LRU = require("lru-cache")
- , cache = minimatch.cache = new LRU(100)
- , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
-
-var path = require("path")
- // any single thing other than /
- // don't need to escape / when using new RegExp()
- , qmark = "[^/]"
-
- // * => any number of characters
- , star = qmark + "*?"
-
- // ** when dots are allowed. Anything goes, except .. and .
- // not (^ or / followed by one or two dots followed by $ or /),
- // followed by anything, any number of times.
- , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
-
- // not a ^ or / followed by a dot,
- // followed by anything, any number of times.
- , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
-
- // characters that need to be escaped in RegExp.
- , reSpecials = charSet("().*{}+?[]^$\\!")
-
-// "abc" -> { a:true, b:true, c:true }
-function charSet (s) {
- return s.split("").reduce(function (set, c) {
- set[c] = true
- return set
- }, {})
-}
-
-// normalizes slashes.
-var slashSplit = /\/+/
-
-minimatch.monkeyPatch = monkeyPatch
-function monkeyPatch () {
- var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
- var orig = desc.value
- desc.value = function (p) {
- if (p instanceof Minimatch) return p.match(this)
- return orig.call(this, p)
- }
- Object.defineProperty(String.prototype, desc)
-}
-
-minimatch.filter = filter
-function filter (pattern, options) {
- options = options || {}
- return function (p, i, list) {
- return minimatch(p, pattern, options)
- }
-}
-
-function ext (a, b) {
- a = a || {}
- b = b || {}
- var t = {}
- Object.keys(b).forEach(function (k) {
- t[k] = b[k]
- })
- Object.keys(a).forEach(function (k) {
- t[k] = a[k]
- })
- return t
-}
-
-minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return minimatch
-
- var orig = minimatch
-
- var m = function minimatch (p, pattern, options) {
- return orig.minimatch(p, pattern, ext(def, options))
- }
-
- m.Minimatch = function Minimatch (pattern, options) {
- return new orig.Minimatch(pattern, ext(def, options))
- }
-
- return m
-}
-
-Minimatch.defaults = function (def) {
- if (!def || !Object.keys(def).length) return Minimatch
- return minimatch.defaults(def).Minimatch
-}
-
-
-function minimatch (p, pattern, options) {
- if (typeof pattern !== "string") {
- throw new TypeError("glob pattern string required")
- }
-
- if (!options) options = {}
-
- // shortcut: comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === "#") {
- return false
- }
-
- // "" only matches ""
- if (pattern.trim() === "") return p === ""
-
- return new Minimatch(pattern, options).match(p)
-}
-
-function Minimatch (pattern, options) {
- if (!(this instanceof Minimatch)) {
- return new Minimatch(pattern, options, cache)
- }
-
- if (typeof pattern !== "string") {
- throw new TypeError("glob pattern string required")
- }
-
- if (!options) options = {}
- pattern = pattern.trim()
-
- // lru storage.
- // these things aren't particularly big, but walking down the string
- // and turning it into a regexp can get pretty costly.
- var cacheKey = pattern + "\n" + Object.keys(options).filter(function (k) {
- return options[k]
- }).join(":")
- var cached = minimatch.cache.get(cacheKey)
- if (cached) return cached
- minimatch.cache.set(cacheKey, this)
-
- this.options = options
- this.set = []
- this.pattern = pattern
- this.regexp = null
- this.negate = false
- this.comment = false
- this.empty = false
-
- // make the set of regexps etc.
- this.make()
-}
-
-Minimatch.prototype.make = make
-function make () {
- // don't do it more than once.
- if (this._made) return
-
- var pattern = this.pattern
- var options = this.options
-
- // empty patterns and comments match nothing.
- if (!options.nocomment && pattern.charAt(0) === "#") {
- this.comment = true
- return
- }
- if (!pattern) {
- this.empty = true
- return
- }
-
- // step 1: figure out negation, etc.
- this.parseNegate()
-
- // step 2: expand braces
- var set = this.globSet = this.braceExpand()
-
- if (options.debug) console.error(this.pattern, set)
-
- // step 3: now we have a set, so turn each one into a series of path-portion
- // matching patterns.
- // These will be regexps, except in the case of "**", which is
- // set to the GLOBSTAR object for globstar behavior,
- // and will not contain any / characters
- set = this.globParts = set.map(function (s) {
- return s.split(slashSplit)
- })
-
- if (options.debug) console.error(this.pattern, set)
-
- // glob --> regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this)
- }, this)
-
- if (options.debug) console.error(this.pattern, set)
-
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return -1 === s.indexOf(false)
- })
-
- if (options.debug) console.error(this.pattern, set)
-
- this.set = set
-}
-
-Minimatch.prototype.parseNegate = parseNegate
-function parseNegate () {
- var pattern = this.pattern
- , negate = false
- , options = this.options
- , negateOffset = 0
-
- if (options.nonegate) return
-
- for ( var i = 0, l = pattern.length
- ; i < l && pattern.charAt(i) === "!"
- ; i ++) {
- negate = !negate
- negateOffset ++
- }
-
- if (negateOffset) this.pattern = pattern.substr(negateOffset)
- this.negate = negate
-}
-
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return new Minimatch(pattern, options).braceExpand()
-}
-
-Minimatch.prototype.braceExpand = braceExpand
-function braceExpand (pattern, options) {
- options = options || this.options
- pattern = typeof pattern === "undefined"
- ? this.pattern : pattern
-
- if (typeof pattern === "undefined") {
- throw new Error("undefined pattern")
- }
-
- if (options.nobrace ||
- !pattern.match(/\{.*\}/)) {
- // shortcut. no need to expand.
- return [pattern]
- }
-
- var escaping = false
-
- // examples and comments refer to this crazy pattern:
- // a{b,c{d,e},{f,g}h}x{y,z}
- // expected:
- // abxy
- // abxz
- // acdxy
- // acdxz
- // acexy
- // acexz
- // afhxy
- // afhxz
- // aghxy
- // aghxz
-
- // everything before the first \{ is just a prefix.
- // So, we pluck that off, and work with the rest,
- // and then prepend it to everything we find.
- if (pattern.charAt(0) !== "{") {
- // console.error(pattern)
- var prefix = null
- for (var i = 0, l = pattern.length; i < l; i ++) {
- var c = pattern.charAt(i)
- // console.error(i, c)
- if (c === "\\") {
- escaping = !escaping
- } else if (c === "{" && !escaping) {
- prefix = pattern.substr(0, i)
- break
- }
- }
-
- // actually no sets, all { were escaped.
- if (prefix === null) {
- // console.error("no sets")
- return [pattern]
- }
-
- var tail = braceExpand(pattern.substr(i), options)
- return tail.map(function (t) {
- return prefix + t
- })
- }
-
- // now we have something like:
- // {b,c{d,e},{f,g}h}x{y,z}
- // walk through the set, expanding each part, until
- // the set ends. then, we'll expand the suffix.
- // If the set only has a single member, then'll put the {} back
-
- // first, handle numeric sets, since they're easier
- var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
- if (numset) {
- // console.error("numset", numset[1], numset[2])
- var suf = braceExpand(pattern.substr(numset[0].length), options)
- , start = +numset[1]
- , end = +numset[2]
- , inc = start > end ? -1 : 1
- , set = []
- for (var i = start; i != (end + inc); i += inc) {
- // append all the suffixes
- for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
- set.push(i + suf[ii])
- }
- }
- return set
- }
-
- // ok, walk through the set
- // We hope, somewhat optimistically, that there
- // will be a } at the end.
- // If the closing brace isn't found, then the pattern is
- // interpreted as braceExpand("\\" + pattern) so that
- // the leading \{ will be interpreted literally.
- var i = 1 // skip the \{
- , depth = 1
- , set = []
- , member = ""
- , sawEnd = false
- , escaping = false
-
- function addMember () {
- set.push(member)
- member = ""
- }
-
- // console.error("Entering for")
- FOR: for (i = 1, l = pattern.length; i < l; i ++) {
- var c = pattern.charAt(i)
- // console.error("", i, c)
-
- if (escaping) {
- escaping = false
- member += "\\" + c
- } else {
- switch (c) {
- case "\\":
- escaping = true
- continue
-
- case "{":
- depth ++
- member += "{"
- continue
-
- case "}":
- depth --
- // if this closes the actual set, then we're done
- if (depth === 0) {
- addMember()
- // pluck off the close-brace
- i ++
- break FOR
- } else {
- member += c
- continue
- }
-
- case ",":
- if (depth === 1) {
- addMember()
- } else {
- member += c
- }
- continue
-
- default:
- member += c
- continue
- } // switch
- } // else
- } // for
-
- // now we've either finished the set, and the suffix is
- // pattern.substr(i), or we have *not* closed the set,
- // and need to escape the leading brace
- if (depth !== 0) {
- // console.error("didn't close", pattern)
- return braceExpand("\\" + pattern, options)
- }
-
- // x{y,z} -> ["xy", "xz"]
- // console.error("set", set)
- // console.error("suffix", pattern.substr(i))
- var suf = braceExpand(pattern.substr(i), options)
- // ["b", "c{d,e}","{f,g}h"] ->
- // [["b"], ["cd", "ce"], ["fh", "gh"]]
- var addBraces = set.length === 1
- // console.error("set pre-expanded", set)
- set = set.map(function (p) {
- return braceExpand(p, options)
- })
- // console.error("set expanded", set)
-
-
- // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
- // ["b", "cd", "ce", "fh", "gh"]
- set = set.reduce(function (l, r) {
- return l.concat(r)
- })
-
- if (addBraces) {
- set = set.map(function (s) {
- return "{" + s + "}"
- })
- }
-
- // now attach the suffixes.
- var ret = []
- for (var i = 0, l = set.length; i < l; i ++) {
- for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
- ret.push(set[i] + suf[ii])
- }
- }
- return ret
-}
-
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse
-var SUBPARSE = {}
-function parse (pattern, isSub) {
- var options = this.options
-
- // shortcuts
- if (!options.noglobstar && pattern === "**") return GLOBSTAR
- if (pattern === "") return ""
-
- var re = ""
- , hasMagic = false
- , escaping = false
- // ? => one single character
- , patternListStack = []
- , plType
- , stateChar
- , inClass = false
- , reClassStart = -1
- , classStart = -1
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- , patternStart = pattern.charAt(0) === "." ? "" // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
- : "(?!\\.)"
-
- function clearStateChar () {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case "*":
- re += star
- hasMagic = true
- break
- case "?":
- re += qmark
- hasMagic = true
- break
- default:
- re += "\\"+stateChar
- break
- }
- stateChar = false
- }
- }
-
- for ( var i = 0, len = pattern.length, c
- ; (i < len) && (c = pattern.charAt(i))
- ; i ++ ) {
-
- if (options.debug) {
- console.error("%s\t%s %s %j", pattern, i, re, c)
- }
-
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += "\\" + c
- escaping = false
- continue
- }
-
- SWITCH: switch (c) {
- case "/":
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false
-
- case "\\":
- clearStateChar()
- escaping = true
- continue
-
- // the various stateChar values
- // for the "extglob" stuff.
- case "?":
- case "*":
- case "+":
- case "@":
- case "!":
- if (options.debug) {
- console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
- }
-
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- if (c === "!" && i === classStart + 1) c = "^"
- re += c
- continue
- }
-
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- clearStateChar()
- stateChar = c
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar()
- continue
-
- case "(":
- if (inClass) {
- re += "("
- continue
- }
-
- if (!stateChar) {
- re += "\\("
- continue
- }
-
- plType = stateChar
- patternListStack.push({ type: plType
- , start: i - 1
- , reStart: re.length })
- // negation is (?:(?!js)[^/]*)
- re += stateChar === "!" ? "(?:(?!" : "(?:"
- stateChar = false
- continue
-
- case ")":
- if (inClass || !patternListStack.length) {
- re += "\\)"
- continue
- }
-
- hasMagic = true
- re += ")"
- plType = patternListStack.pop().type
- // negation is (?:(?!js)[^/]*)
- // The others are (?:<pattern>)<type>
- switch (plType) {
- case "!":
- re += "[^/]*?)"
- break
- case "?":
- case "+":
- case "*": re += plType
- case "@": break // the default anyway
- }
- continue
-
- case "|":
- if (inClass || !patternListStack.length || escaping) {
- re += "\\|"
- escaping = false
- continue
- }
-
- re += "|"
- continue
-
- // these are mostly the same in regexp and glob
- case "[":
- // swallow any state-tracking char before the [
- clearStateChar()
-
- if (inClass) {
- re += "\\" + c
- continue
- }
-
- inClass = true
- classStart = i
- reClassStart = re.length
- re += c
- continue
-
- case "]":
- // a right bracket shall lose its special
- // meaning and represent itself in
- // a bracket expression if it occurs
- // first in the list. -- POSIX.2 2.8.3.2
- if (i === classStart + 1 || !inClass) {
- re += "\\" + c
- escaping = false
- continue
- }
-
- // finish up the class.
- hasMagic = true
- inClass = false
- re += c
- continue
-
- default:
- // swallow any state char that wasn't consumed
- clearStateChar()
-
- if (escaping) {
- // no need
- escaping = false
- } else if (reSpecials[c]
- && !(c === "^" && inClass)) {
- re += "\\"
- }
-
- re += c
-
- } // switch
- } // for
-
-
- // handle the case where we left a class open.
- // "[abc" is valid, equivalent to "\[abc"
- if (inClass) {
- // split where the last [ was, and escape it
- // this is a huge pita. We now have to re-walk
- // the contents of the would-be class to re-translate
- // any characters that were passed through as-is
- var cs = pattern.substr(classStart + 1)
- , sp = this.parse(cs, SUBPARSE)
- re = re.substr(0, reClassStart) + "\\[" + sp[0]
- hasMagic = hasMagic || sp[1]
- }
-
- // handle the case where we had a +( thing at the *end*
- // of the pattern.
- // each pattern list stack adds 3 chars, and we need to go through
- // and escape any | chars that were passed through as-is for the regexp.
- // Go through and escape them, taking care not to double-escape any
- // | chars that were already escaped.
- var pl
- while (pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + 3)
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = "\\"
- }
-
- // need to escape all those slashes *again*, without escaping the
- // one that we need for escaping the | character. As it works out,
- // escaping an even number of slashes can be done by simply repeating
- // it exactly after itself. That's why this trick works.
- //
- // I am sorry that you have to see this.
- return $1 + $1 + $2 + "|"
- })
-
- // console.error("tail=%j\n %s", tail, tail)
- var t = pl.type === "*" ? star
- : pl.type === "?" ? qmark
- : "\\" + pl.type
-
- hasMagic = true
- re = re.slice(0, pl.reStart)
- + t + "\\("
- + tail
- }
-
- // handle trailing things that only matter at the very end.
- clearStateChar()
- if (escaping) {
- // trailing \\
- re += "\\\\"
- }
-
- // only need to apply the nodot start if the re starts with
- // something that could conceivably capture a dot
- var addPatternStart = false
- switch (re.charAt(0)) {
- case ".":
- case "[":
- case "(": addPatternStart = true
- }
-
- // if the re is not "" at this point, then we need to make sure
- // it doesn't match against an empty path part.
- // Otherwise a/* will match a/, which it should not.
- if (re !== "" && hasMagic) re = "(?=.)" + re
-
- if (addPatternStart) re = patternStart + re
-
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [ re, hasMagic ]
- }
-
- // skip the regexp for non-magical patterns
- // unescape anything in it, though, so that it'll be
- // an exact match against a file etc.
- if (!hasMagic) {
- return globUnescape(pattern)
- }
-
- var flags = options.nocase ? "i" : ""
- , regExp = new RegExp("^" + re + "$", flags)
-
- regExp._glob = pattern
- regExp._src = re
-
- return regExp
-}
-
-minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe()
-}
-
-Minimatch.prototype.makeRe = makeRe
-function makeRe () {
- if (this.regexp || this.regexp === false) return this.regexp
-
- // at this point, this.set is a 2d array of partial
- // pattern strings, or "**".
- //
- // It's better to use .match(). This function shouldn't
- // be used, really, but it's pretty convenient sometimes,
- // when you just want to work with a regex.
- var set = this.set
-
- if (!set.length) return this.regexp = false
- var options = this.options
-
- var twoStar = options.noglobstar ? star
- : options.dot ? twoStarDot
- : twoStarNoDot
- , flags = options.nocase ? "i" : ""
-
- var re = set.map(function (pattern) {
- return pattern.map(function (p) {
- return (p === GLOBSTAR) ? twoStar
- : (typeof p === "string") ? regExpEscape(p)
- : p._src
- }).join("\\\/")
- }).join("|")
-
- // must match entire pattern
- // ending in a * or ** will make it less strict.
- re = "^" + re + "$"
-
- // can match anything, as long as it's not this.
- if (this.negate) re = "^(?!" + re + ").*$"
-
- try {
- return this.regexp = new RegExp(re, flags)
- } catch (ex) {
- return this.regexp = false
- }
-}
-
-minimatch.match = function (list, pattern, options) {
- var mm = new Minimatch(pattern, options)
- list = list.filter(function (f) {
- return mm.match(f)
- })
- if (options.nonull && !list.length) {
- list.push(pattern)
- }
- return list
-}
-
-Minimatch.prototype.match = match
-function match (f, partial) {
- // console.error("match", f, this.pattern)
- // short-circuit in the case of busted things.
- // comments, etc.
- if (this.comment) return false
- if (this.empty) return f === ""
-
- if (f === "/" && partial) return true
-
- var options = this.options
-
- // windows: need to use /, not \
- // On other platforms, \ is a valid (albeit bad) filename char.
- if (platform === "win32") {
- f = f.split("\\").join("/")
- }
-
- // treat the test path as a set of pathparts.
- f = f.split(slashSplit)
- if (options.debug) {
- console.error(this.pattern, "split", f)
- }
-
- // just ONE of the pattern sets in this.set needs to match
- // in order for it to be valid. If negating, then just one
- // match means that we have failed.
- // Either way, return on the first hit.
-
- var set = this.set
- // console.error(this.pattern, "set", set)
-
- for (var i = 0, l = set.length; i < l; i ++) {
- var pattern = set[i]
- var hit = this.matchOne(f, pattern, partial)
- if (hit) {
- if (options.flipNegate) return true
- return !this.negate
- }
- }
-
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false
- return this.negate
-}
-
-// set partial to true to test if, for example,
-// "/a/b" matches the start of "/*/b/*/d"
-// Partial means, if you run out of file before you run
-// out of pattern, then that's fine, as long as all
-// the parts match.
-Minimatch.prototype.matchOne = function (file, pattern, partial) {
- var options = this.options
-
- if (options.debug) {
- console.error("matchOne",
- { "this": this
- , file: file
- , pattern: pattern })
- }
-
- if (options.matchBase && pattern.length === 1) {
- file = path.basename(file.join("/")).split("/")
- }
-
- if (options.debug) {
- console.error("matchOne", file.length, pattern.length)
- }
-
- for ( var fi = 0
- , pi = 0
- , fl = file.length
- , pl = pattern.length
- ; (fi < fl) && (pi < pl)
- ; fi ++, pi ++ ) {
-
- if (options.debug) {
- console.error("matchOne loop")
- }
- var p = pattern[pi]
- , f = file[fi]
-
- if (options.debug) {
- console.error(pattern, p, f)
- }
-
- // should be impossible.
- // some invalid regexp stuff in the set.
- if (p === false) return false
-
- if (p === GLOBSTAR) {
- // "**"
- // a/**/b/**/c would match the following:
- // a/b/x/y/z/c
- // a/x/y/z/b/c
- // a/b/x/b/x/c
- // a/b/c
- // To do this, take the rest of the pattern after
- // the **, and see if it would match the file remainder.
- // If so, return success.
- // If not, the ** "swallows" a segment, and try again.
- // This is recursively awful.
- // a/b/x/y/z/c
- // - a matches a
- // - doublestar
- // - matchOne(b/x/y/z/c, b/**/c)
- // - b matches b
- // - doublestar
- // - matchOne(x/y/z/c, c) -> no
- // - matchOne(y/z/c, c) -> no
- // - matchOne(z/c, c) -> no
- // - matchOne(c, c) yes, hit
- var fr = fi
- , pr = pi + 1
- if (pr === pl) {
- // a ** at the end will just swallow the rest.
- // We have found a match.
- // however, it will not swallow /.x, unless
- // options.dot is set.
- // . and .. are *never* matched by **, for explosively
- // exponential reasons.
- for ( ; fi < fl; fi ++) {
- if (file[fi] === "." || file[fi] === ".." ||
- (!options.dot && file[fi].charAt(0) === ".")) return false
- }
- return true
- }
-
- // ok, let's see if we can swallow whatever we can.
- WHILE: while (fr < fl) {
- var swallowee = file[fr]
- if (swallowee === "." || swallowee === ".." ||
- (!options.dot && swallowee.charAt(0) === ".")) {
- // console.error("dot detected!")
- break WHILE
- }
-
- // XXX remove this slice. Just pass the start index.
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- // found a match.
- return true
- } else {
- // ** swallows a segment, and continue.
- fr ++
- }
- }
- // no match was found.
- // However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
- if (partial) {
- // ran out of file
- // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
- if (fr === fl) return true
- }
- return false
- }
-
- // something other than **
- // non-magic patterns just have to match exactly
- // patterns with magic have been turned into regexps.
- var hit
- if (typeof p === "string") {
- if (options.nocase) {
- hit = f.toLowerCase() === p.toLowerCase()
- } else {
- hit = f === p
- }
- if (options.debug) {
- console.error("string match", p, f, hit)
- }
- } else {
- hit = f.match(p)
- if (options.debug) {
- console.error("pattern match", p, f, hit)
- }
- }
-
- if (!hit) return false
- }
-
- // Note: ending in / means that we'll get a final ""
- // at the end of the pattern. This can only match a
- // corresponding "" at the end of the file.
- // If the file ends in /, then it can only match a
- // a pattern that ends in /, unless the pattern just
- // doesn't have any more for it. But, a/b/ should *not*
- // match "a/b/*", even though "" matches against the
- // [^/]*? pattern, except in partial mode, where it might
- // simply not be reached yet.
- // However, a/b/ should still satisfy a/*
-
- // now either we fell off the end of the pattern, or we're done.
- if (fi === fl && pi === pl) {
- // ran out of pattern and filename at the same time.
- // an exact hit!
- return true
- } else if (fi === fl) {
- // ran out of file, but still had pattern left.
- // this is ok if we're doing the match as part of
- // a glob fs traversal.
- return partial
- } else if (pi === pl) {
- // ran out of pattern, still have file left.
- // this is only acceptable if we're on the very last
- // empty segment of a file with a trailing slash.
- // a/* should match a/b/
- var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
- return emptyFileEnd
- }
-
- // should be unreachable.
- throw new Error("wtf?")
-}
-
-
-// replace stuff like \* with *
-function globUnescape (s) {
- return s.replace(/\\(.)/g, "$1")
-}
-
-
-function regExpEscape (s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
-}
-
-})( typeof require === "function" ? require : null,
- this,
- typeof module === "object" ? module : null,
- typeof process === "object" ? process.platform : "win32"
- )
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
deleted file mode 100644
index 07e6e472cc..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS
deleted file mode 100644
index d8e20616e3..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS
+++ /dev/null
@@ -1,5 +0,0 @@
-# Authors, sorted by whether or not they are me
-Isaac Z. Schlueter <i@izs.me>
-Carlos Brito Lage <carlos@carloslage.net>
-Marko Mikulicic <marko.mikulicic@isti.cnr.it>
-Trent Mick <trentm@gmail.com>
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
deleted file mode 100644
index 05a4010949..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
-All rights reserved.
-
-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.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
deleted file mode 100644
index f342b519b4..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# lru cache
-
-A cache object that deletes the least-recently-used items.
-
-Usage:
-
- var LRU = require("lru-cache")
- , cache = LRU(10, // max length. default = Infinity
- // calculate how "big" each item is
- //
- // defaults to function(){return 1}, ie, just limit
- // the item count, without any knowledge as to their
- // relative size.
- function (item) { return item.length })
-
- cache.set("key", "value")
- cache.get("key") // "value"
-
- cache.reset() // empty the cache
-
-If you put more stuff in it, then items will fall out.
-
-If you try to put an oversized thing in it, then it'll fall out right
-away.
-
-RTFS for more info.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
deleted file mode 100644
index 1bd4e58647..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
+++ /dev/null
@@ -1,156 +0,0 @@
-;(function () { // closure for web browsers
-
-if (module) {
- module.exports = LRUCache
-} else {
- // just set the global for non-node platforms.
- ;(function () { return this })().LRUCache = LRUCache
-}
-
-function hOP (obj, key) {
- return Object.prototype.hasOwnProperty.call(obj, key)
-}
-
-function naiveLength () { return 1 }
-
-function LRUCache (maxLength, lengthCalculator) {
- if (!(this instanceof LRUCache)) {
- return new LRUCache(maxLength, lengthCalculator)
- }
-
- if (typeof lengthCalculator !== "function") {
- lengthCalculator = naiveLength
- }
- if (!maxLength || !(typeof maxLength === "number") || maxLength <= 0 ) {
- maxLength = Infinity
- }
-
-
- var cache = {} // hash of items by key
- , lruList = {} // list of items in order of use recency
- , lru = 0 // least recently used
- , mru = 0 // most recently used
- , length = 0 // number of items in the list
- , itemCount = 0
-
-
- // resize the cache when the maxLength changes.
- Object.defineProperty(this, "maxLength",
- { set : function (mL) {
- if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
- maxLength = mL
- // if it gets above double maxLength, trim right away.
- // otherwise, do it whenever it's convenient.
- if (length > maxLength) trim()
- }
- , get : function () { return maxLength }
- , enumerable : true
- })
-
- // resize the cache when the lengthCalculator changes.
- Object.defineProperty(this, "lengthCalculator",
- { set : function (lC) {
- if (typeof lC !== "function") {
- lengthCalculator = naiveLength
- length = itemCount
- Object.keys(cache).forEach(function (key) {
- cache[key].length = 1
- })
- } else {
- lengthCalculator = lC
- length = 0
- Object.keys(cache).forEach(function (key) {
- cache[key].length = lengthCalculator(cache[key].value)
- length += cache[key].length
- })
- }
-
- if (length > maxLength) trim()
- }
- , get : function () { return lengthCalculator }
- , enumerable : true
- })
-
- Object.defineProperty(this, "length",
- { get : function () { return length }
- , enumerable : true
- })
-
-
- Object.defineProperty(this, "itemCount",
- { get : function () { return itemCount }
- , enumerable : true
- })
-
- this.reset = function () {
- cache = {}
- lruList = {}
- lru = 0
- mru = 0
- length = 0
- itemCount = 0
- }
-
- // Provided for debugging/dev purposes only. No promises whatsoever that
- // this API stays stable.
- this.dump = function () {
- return cache
- }
-
- this.set = function (key, value) {
- if (hOP(cache, key)) {
- this.get(key)
- cache[key].value = value
- return
- }
-
- var hit = {key:key, value:value, lu:mru++, length:lengthCalculator(value)}
-
- // oversized objects fall out of cache automatically.
- if (hit.length > maxLength) return
-
- length += hit.length
- lruList[hit.lu] = cache[key] = hit
- itemCount ++
-
- if (length > maxLength) trim()
- }
-
- this.get = function (key) {
- if (!hOP(cache, key)) return
- var hit = cache[key]
- delete lruList[hit.lu]
- if (hit.lu === lru) lruWalk()
- hit.lu = mru ++
- lruList[hit.lu] = hit
- return hit.value
- }
-
- this.del = function (key) {
- if (!hOP(cache, key)) return
- var hit = cache[key]
- delete cache[key]
- delete lruList[hit.lu]
- if (hit.lu === lru) lruWalk()
- length -= hit.length
- itemCount --
- }
-
- function lruWalk () {
- // lru has been deleted, hop up to the next hit.
- lru = Object.keys(lruList)[0]
- }
-
- function trim () {
- if (length <= maxLength) return
- var prune = Object.keys(lruList)
- for (var i = 0; i < prune.length && length > maxLength; i ++) {
- length -= lruList[prune[i]].length
- delete cache[ lruList[prune[i]].key ]
- delete lruList[prune[i]]
- }
- lruWalk()
- }
-}
-
-})()
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
deleted file mode 100644
index ff30591268..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "lru-cache",
- "description": "A cache object that deletes the least-recently-used items.",
- "version": "1.1.0",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me"
- },
- "scripts": {
- "test": "tap test"
- },
- "main": "lib/lru-cache.js",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-lru-cache.git"
- },
- "devDependencies": {
- "tap": ""
- },
- "license": {
- "type": "MIT",
- "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
- },
- "contributors": [
- {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me"
- },
- {
- "name": "Carlos Brito Lage",
- "email": "carlos@carloslage.net"
- },
- {
- "name": "Marko Mikulicic",
- "email": "marko.mikulicic@isti.cnr.it"
- },
- {
- "name": "Trent Mick",
- "email": "trentm@gmail.com"
- }
- ],
- "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\nUsage:\n\n var LRU = require(\"lru-cache\")\n , cache = LRU(10, // max length. default = Infinity\n // calculate how \"big\" each item is\n //\n // defaults to function(){return 1}, ie, just limit\n // the item count, without any knowledge as to their\n // relative size.\n function (item) { return item.length })\n\n cache.set(\"key\", \"value\")\n cache.get(\"key\") // \"value\"\n\n cache.reset() // empty the cache\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\nRTFS for more info.\n",
- "_id": "lru-cache@1.1.0",
- "_from": "lru-cache@~1"
-}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
deleted file mode 100644
index 6af0edf6c7..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
+++ /dev/null
@@ -1,171 +0,0 @@
-var test = require("tap").test
- , LRU = require("../")
-
-test("basic", function (t) {
- var cache = new LRU(10)
- cache.set("key", "value")
- t.equal(cache.get("key"), "value")
- t.equal(cache.get("nada"), undefined)
- t.equal(cache.length, 1)
- t.equal(cache.maxLength, 10)
- t.end()
-})
-
-test("least recently set", function (t) {
- var cache = new LRU(2)
- cache.set("a", "A")
- cache.set("b", "B")
- cache.set("c", "C")
- t.equal(cache.get("c"), "C")
- t.equal(cache.get("b"), "B")
- t.equal(cache.get("a"), undefined)
- t.end()
-})
-
-test("lru recently gotten", function (t) {
- var cache = new LRU(2)
- cache.set("a", "A")
- cache.set("b", "B")
- cache.get("a")
- cache.set("c", "C")
- t.equal(cache.get("c"), "C")
- t.equal(cache.get("b"), undefined)
- t.equal(cache.get("a"), "A")
- t.end()
-})
-
-test("del", function (t) {
- var cache = new LRU(2)
- cache.set("a", "A")
- cache.del("a")
- t.equal(cache.get("a"), undefined)
- t.end()
-})
-
-test("maxLength", function (t) {
- var cache = new LRU(3)
-
- // test changing the maxLength, verify that the LRU items get dropped.
- cache.maxLength = 100
- for (var i = 0; i < 100; i ++) cache.set(i, i)
- t.equal(cache.length, 100)
- for (var i = 0; i < 100; i ++) {
- t.equal(cache.get(i), i)
- }
- cache.maxLength = 3
- t.equal(cache.length, 3)
- for (var i = 0; i < 97; i ++) {
- t.equal(cache.get(i), undefined)
- }
- for (var i = 98; i < 100; i ++) {
- t.equal(cache.get(i), i)
- }
-
- // now remove the maxLength restriction, and try again.
- cache.maxLength = "hello"
- for (var i = 0; i < 100; i ++) cache.set(i, i)
- t.equal(cache.length, 100)
- for (var i = 0; i < 100; i ++) {
- t.equal(cache.get(i), i)
- }
- // should trigger an immediate resize
- cache.maxLength = 3
- t.equal(cache.length, 3)
- for (var i = 0; i < 97; i ++) {
- t.equal(cache.get(i), undefined)
- }
- for (var i = 98; i < 100; i ++) {
- t.equal(cache.get(i), i)
- }
- t.end()
-})
-
-test("reset", function (t) {
- var cache = new LRU(10)
- cache.set("a", "A")
- cache.set("b", "B")
- cache.reset()
- t.equal(cache.length, 0)
- t.equal(cache.maxLength, 10)
- t.equal(cache.get("a"), undefined)
- t.equal(cache.get("b"), undefined)
- t.end()
-})
-
-
-// Note: `<cache>.dump()` is a debugging tool only. No guarantees are made
-// about the format/layout of the response.
-test("dump", function (t) {
- var cache = new LRU(10)
- var d = cache.dump();
- t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
- cache.set("a", "A")
- var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } }
- t.ok(d.a)
- t.equal(d.a.key, "a")
- t.equal(d.a.value, "A")
- t.equal(d.a.lu, 0)
-
- cache.set("b", "B")
- cache.get("b")
- d = cache.dump()
- t.ok(d.b)
- t.equal(d.b.key, "b")
- t.equal(d.b.value, "B")
- t.equal(d.b.lu, 2)
-
- t.end()
-})
-
-
-test("basic with weighed length", function (t) {
- var cache = new LRU(100, function (item) { return item.size } )
- cache.set("key", {val: "value", size: 50})
- t.equal(cache.get("key").val, "value")
- t.equal(cache.get("nada"), undefined)
- t.equal(cache.lengthCalculator(cache.get("key")), 50)
- t.equal(cache.length, 50)
- t.equal(cache.maxLength, 100)
- t.end()
-})
-
-
-test("weighed length item too large", function (t) {
- var cache = new LRU(10, function (item) { return item.size } )
- t.equal(cache.maxLength, 10)
-
- // should fall out immediately
- cache.set("key", {val: "value", size: 50})
-
- t.equal(cache.length, 0)
- t.equal(cache.get("key"), undefined)
- t.end()
-})
-
-test("least recently set with weighed length", function (t) {
- var cache = new LRU(8, function (item) { return item.length })
- cache.set("a", "A")
- cache.set("b", "BB")
- cache.set("c", "CCC")
- cache.set("d", "DDDD")
- t.equal(cache.get("d"), "DDDD")
- t.equal(cache.get("c"), "CCC")
- t.equal(cache.get("b"), undefined)
- t.equal(cache.get("a"), undefined)
- t.end()
-})
-
-test("lru recently gotten with weighed length", function (t) {
- var cache = new LRU(8, function (item) { return item.length })
- cache.set("a", "A")
- cache.set("b", "BB")
- cache.set("c", "CCC")
- cache.get("a")
- cache.get("b")
- cache.set("d", "DDDD")
- t.equal(cache.get("c"), undefined)
- t.equal(cache.get("d"), "DDDD")
- t.equal(cache.get("b"), "BB")
- t.equal(cache.get("a"), "A")
- t.end()
-})
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
deleted file mode 100644
index 0c44ae716d..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Isaac Z. Schlueter ("Author")
-All rights reserved.
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
deleted file mode 100644
index 7e365129e4..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# sigmund
-
-Quick and dirty signatures for Objects.
-
-This is like a much faster `deepEquals` comparison, which returns a
-string key suitable for caches and the like.
-
-## Usage
-
-```javascript
-function doSomething (someObj) {
- var key = sigmund(someObj, maxDepth) // max depth defaults to 10
- var cached = cache.get(key)
- if (cached) return cached)
-
- var result = expensiveCalculation(someObj)
- cache.set(key, result)
- return result
-}
-```
-
-The resulting key will be as unique and reproducible as calling
-`JSON.stringify` or `util.inspect` on the object, but is much faster.
-In order to achieve this speed, some differences are glossed over.
-For example, the object `{0:'foo'}` will be treated identically to the
-array `['foo']`.
-
-Also, just as there is no way to summon the soul from the scribblings
-of a cocain-addled psychoanalyst, there is no way to revive the object
-from the signature string that sigmund gives you. In fact, it's
-barely even readable.
-
-As with `sys.inspect` and `JSON.stringify`, larger objects will
-produce larger signature strings.
-
-Because sigmund is a bit less strict than the more thorough
-alternatives, the strings will be shorter, and also there is a
-slightly higher chance for collisions. For example, these objects
-have the same signature:
-
- var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
- var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
-
-Like a good Freudian, sigmund is most effective when you already have
-some understanding of what you're looking for. It can help you help
-yourself, but you must be willing to do some work as well.
-
-Cycles are handled, and cyclical objects are silently omitted (though
-the key is included in the signature output.)
-
-The second argument is the maximum depth, which defaults to 10,
-because that is the maximum object traversal depth covered by most
-insurance carriers.
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
deleted file mode 100644
index 5acfd6d90d..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
+++ /dev/null
@@ -1,283 +0,0 @@
-// different ways to id objects
-// use a req/res pair, since it's crazy deep and cyclical
-
-// sparseFE10 and sigmund are usually pretty close, which is to be expected,
-// since they are essentially the same algorithm, except that sigmund handles
-// regular expression objects properly.
-
-
-var http = require('http')
-var util = require('util')
-var sigmund = require('./sigmund.js')
-var sreq, sres, creq, cres, test
-
-http.createServer(function (q, s) {
- sreq = q
- sres = s
- sres.end('ok')
- this.close(function () { setTimeout(function () {
- start()
- }, 200) })
-}).listen(1337, function () {
- creq = http.get({ port: 1337 })
- creq.on('response', function (s) { cres = s })
-})
-
-function start () {
- test = [sreq, sres, creq, cres]
- // test = sreq
- // sreq.sres = sres
- // sreq.creq = creq
- // sreq.cres = cres
-
- for (var i in exports.compare) {
- console.log(i)
- var hash = exports.compare[i]()
- console.log(hash)
- console.log(hash.length)
- console.log('')
- }
-
- require('bench').runMain()
-}
-
-function customWs (obj, md, d) {
- d = d || 0
- var to = typeof obj
- if (to === 'undefined' || to === 'function' || to === null) return ''
- if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
-
- if (Array.isArray(obj)) {
- return obj.map(function (i, _, __) {
- return customWs(i, md, d + 1)
- }).reduce(function (a, b) { return a + b }, '')
- }
-
- var keys = Object.keys(obj)
- return keys.map(function (k, _, __) {
- return k + ':' + customWs(obj[k], md, d + 1)
- }).reduce(function (a, b) { return a + b }, '')
-}
-
-function custom (obj, md, d) {
- d = d || 0
- var to = typeof obj
- if (to === 'undefined' || to === 'function' || to === null) return ''
- if (d > md || !obj || to !== 'object') return '' + obj
-
- if (Array.isArray(obj)) {
- return obj.map(function (i, _, __) {
- return custom(i, md, d + 1)
- }).reduce(function (a, b) { return a + b }, '')
- }
-
- var keys = Object.keys(obj)
- return keys.map(function (k, _, __) {
- return k + ':' + custom(obj[k], md, d + 1)
- }).reduce(function (a, b) { return a + b }, '')
-}
-
-function sparseFE2 (obj, maxDepth) {
- var seen = []
- var soFar = ''
- function ch (v, depth) {
- if (depth > maxDepth) return
- if (typeof v === 'function' || typeof v === 'undefined') return
- if (typeof v !== 'object' || !v) {
- soFar += v
- return
- }
- if (seen.indexOf(v) !== -1 || depth === maxDepth) return
- seen.push(v)
- soFar += '{'
- Object.keys(v).forEach(function (k, _, __) {
- // pseudo-private values. skip those.
- if (k.charAt(0) === '_') return
- var to = typeof v[k]
- if (to === 'function' || to === 'undefined') return
- soFar += k + ':'
- ch(v[k], depth + 1)
- })
- soFar += '}'
- }
- ch(obj, 0)
- return soFar
-}
-
-function sparseFE (obj, maxDepth) {
- var seen = []
- var soFar = ''
- function ch (v, depth) {
- if (depth > maxDepth) return
- if (typeof v === 'function' || typeof v === 'undefined') return
- if (typeof v !== 'object' || !v) {
- soFar += v
- return
- }
- if (seen.indexOf(v) !== -1 || depth === maxDepth) return
- seen.push(v)
- soFar += '{'
- Object.keys(v).forEach(function (k, _, __) {
- // pseudo-private values. skip those.
- if (k.charAt(0) === '_') return
- var to = typeof v[k]
- if (to === 'function' || to === 'undefined') return
- soFar += k
- ch(v[k], depth + 1)
- })
- }
- ch(obj, 0)
- return soFar
-}
-
-function sparse (obj, maxDepth) {
- var seen = []
- var soFar = ''
- function ch (v, depth) {
- if (depth > maxDepth) return
- if (typeof v === 'function' || typeof v === 'undefined') return
- if (typeof v !== 'object' || !v) {
- soFar += v
- return
- }
- if (seen.indexOf(v) !== -1 || depth === maxDepth) return
- seen.push(v)
- soFar += '{'
- for (var k in v) {
- // pseudo-private values. skip those.
- if (k.charAt(0) === '_') continue
- var to = typeof v[k]
- if (to === 'function' || to === 'undefined') continue
- soFar += k
- ch(v[k], depth + 1)
- }
- }
- ch(obj, 0)
- return soFar
-}
-
-function noCommas (obj, maxDepth) {
- var seen = []
- var soFar = ''
- function ch (v, depth) {
- if (depth > maxDepth) return
- if (typeof v === 'function' || typeof v === 'undefined') return
- if (typeof v !== 'object' || !v) {
- soFar += v
- return
- }
- if (seen.indexOf(v) !== -1 || depth === maxDepth) return
- seen.push(v)
- soFar += '{'
- for (var k in v) {
- // pseudo-private values. skip those.
- if (k.charAt(0) === '_') continue
- var to = typeof v[k]
- if (to === 'function' || to === 'undefined') continue
- soFar += k + ':'
- ch(v[k], depth + 1)
- }
- soFar += '}'
- }
- ch(obj, 0)
- return soFar
-}
-
-
-function flatten (obj, maxDepth) {
- var seen = []
- var soFar = ''
- function ch (v, depth) {
- if (depth > maxDepth) return
- if (typeof v === 'function' || typeof v === 'undefined') return
- if (typeof v !== 'object' || !v) {
- soFar += v
- return
- }
- if (seen.indexOf(v) !== -1 || depth === maxDepth) return
- seen.push(v)
- soFar += '{'
- for (var k in v) {
- // pseudo-private values. skip those.
- if (k.charAt(0) === '_') continue
- var to = typeof v[k]
- if (to === 'function' || to === 'undefined') continue
- soFar += k + ':'
- ch(v[k], depth + 1)
- soFar += ','
- }
- soFar += '}'
- }
- ch(obj, 0)
- return soFar
-}
-
-exports.compare =
-{
- // 'custom 2': function () {
- // return custom(test, 2, 0)
- // },
- // 'customWs 2': function () {
- // return customWs(test, 2, 0)
- // },
- 'JSON.stringify (guarded)': function () {
- var seen = []
- return JSON.stringify(test, function (k, v) {
- if (typeof v !== 'object' || !v) return v
- if (seen.indexOf(v) !== -1) return undefined
- seen.push(v)
- return v
- })
- },
-
- 'flatten 10': function () {
- return flatten(test, 10)
- },
-
- // 'flattenFE 10': function () {
- // return flattenFE(test, 10)
- // },
-
- 'noCommas 10': function () {
- return noCommas(test, 10)
- },
-
- 'sparse 10': function () {
- return sparse(test, 10)
- },
-
- 'sparseFE 10': function () {
- return sparseFE(test, 10)
- },
-
- 'sparseFE2 10': function () {
- return sparseFE2(test, 10)
- },
-
- sigmund: function() {
- return sigmund(test, 10)
- },
-
-
- // 'util.inspect 1': function () {
- // return util.inspect(test, false, 1, false)
- // },
- // 'util.inspect undefined': function () {
- // util.inspect(test)
- // },
- // 'util.inspect 2': function () {
- // util.inspect(test, false, 2, false)
- // },
- // 'util.inspect 3': function () {
- // util.inspect(test, false, 3, false)
- // },
- // 'util.inspect 4': function () {
- // util.inspect(test, false, 4, false)
- // },
- // 'util.inspect Infinity': function () {
- // util.inspect(test, false, Infinity, false)
- // }
-}
-
-/** results
-**/
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
deleted file mode 100644
index 92a63e9613..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "sigmund",
- "version": "1.0.0",
- "description": "Quick and dirty signatures for Objects.",
- "main": "sigmund.js",
- "directories": {
- "test": "test"
- },
- "dependencies": {},
- "devDependencies": {
- "tap": "~0.3.0"
- },
- "scripts": {
- "test": "tap test/*.js",
- "bench": "node bench.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/sigmund"
- },
- "keywords": [
- "object",
- "signature",
- "key",
- "data",
- "psychoanalysis"
- ],
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "license": "BSD",
- "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
- "readmeFilename": "README.md",
- "_id": "sigmund@1.0.0",
- "_from": "sigmund@~1.0.0"
-}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
deleted file mode 100644
index 82c7ab8ce9..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
+++ /dev/null
@@ -1,39 +0,0 @@
-module.exports = sigmund
-function sigmund (subject, maxSessions) {
- maxSessions = maxSessions || 10;
- var notes = [];
- var analysis = '';
- var RE = RegExp;
-
- function psychoAnalyze (subject, session) {
- if (session > maxSessions) return;
-
- if (typeof subject === 'function' ||
- typeof subject === 'undefined') {
- return;
- }
-
- if (typeof subject !== 'object' || !subject ||
- (subject instanceof RE)) {
- analysis += subject;
- return;
- }
-
- if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
-
- notes.push(subject);
- analysis += '{';
- Object.keys(subject).forEach(function (issue, _, __) {
- // pseudo-private values. skip those.
- if (issue.charAt(0) === '_') return;
- var to = typeof subject[issue];
- if (to === 'function' || to === 'undefined') return;
- analysis += issue;
- psychoAnalyze(subject[issue], session + 1);
- });
- }
- psychoAnalyze(subject, 0);
- return analysis;
-}
-
-// vim: set softtabstop=4 shiftwidth=4:
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
deleted file mode 100644
index 50c53a13e9..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var test = require('tap').test
-var sigmund = require('../sigmund.js')
-
-
-// occasionally there are duplicates
-// that's an acceptable edge-case. JSON.stringify and util.inspect
-// have some collision potential as well, though less, and collision
-// detection is expensive.
-var hash = '{abc/def/g{0h1i2{jkl'
-var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
-var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
-
-var obj3 = JSON.parse(JSON.stringify(obj1))
-obj3.c = /def/
-obj3.g[2].cycle = obj3
-var cycleHash = '{abc/def/g{0h1i2{jklcycle'
-
-test('basic', function (t) {
- t.equal(sigmund(obj1), hash)
- t.equal(sigmund(obj2), hash)
- t.equal(sigmund(obj3), cycleHash)
- t.end()
-})
-
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/package.json b/tools/blog/node_modules/glob/node_modules/minimatch/package.json
deleted file mode 100644
index b42082dcda..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me"
- },
- "name": "minimatch",
- "description": "A minimal matching utility.",
- "version": "0.2.5",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/minimatch.git"
- },
- "main": "minimatch.js",
- "scripts": {
- "test": "tap test"
- },
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "lru-cache": "~1"
- },
- "devDependencies": {
- "tap": ""
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
- }
- ],
- "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
- "_id": "minimatch@0.2.5",
- "_from": "minimatch@0.2"
-}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js
deleted file mode 100644
index cf1778a575..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/test/basic.js
+++ /dev/null
@@ -1,273 +0,0 @@
-// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
-//
-// TODO: Some of these tests do very bad things with backslashes, and will
-// most likely fail badly on windows. They should probably be skipped.
-
-var tap = require("tap")
- , globalBefore = Object.keys(global)
- , mm = require("../")
- , files = [ "a", "b", "c", "d", "abc"
- , "abd", "abe", "bb", "bcd"
- , "ca", "cb", "dd", "de"
- , "bdir/", "bdir/cfile"]
- , next = files.concat([ "a-b", "aXb"
- , ".x", ".y" ])
-
-tap.test("basic tests", function (t) {
- var start = Date.now()
-
- // [ pattern, [matches], MM opts, files, TAP opts]
- ; [ "http://www.bashcookbook.com/bashinfo" +
- "/source/bash-1.14.7/tests/glob-test"
- , ["a*", ["a", "abc", "abd", "abe"]]
- , ["X*", ["X*"], {nonull: true}]
-
- // allow null glob expansion
- , ["X*", []]
-
- // isaacs: Slightly different than bash/sh/ksh
- // \\* is not un-escaped to literal "*" in a failed match,
- // but it does make it get treated as a literal star
- , ["\\*", ["\\*"], {nonull: true}]
- , ["\\**", ["\\**"], {nonull: true}]
- , ["\\*\\*", ["\\*\\*"], {nonull: true}]
-
- , ["b*/", ["bdir/"]]
- , ["c*", ["c", "ca", "cb"]]
- , ["**", files]
-
- , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
- , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
-
- , "legendary larry crashes bashes"
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
-
- , "character classes"
- , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
- , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
- "bdir/", "ca", "cb", "dd", "de"]]
- , ["a*[^c]", ["abd", "abe"]]
- , function () { files.push("a-b", "aXb") }
- , ["a[X-]b", ["a-b", "aXb"]]
- , function () { files.push(".x", ".y") }
- , ["[^a-c]*", ["d", "dd", "de"]]
- , function () { files.push("a*b/", "a*b/ooo") }
- , ["a\\*b/*", ["a*b/ooo"]]
- , ["a\\*?/*", ["a*b/ooo"]]
- , ["*\\\\!*", [], {null: true}, ["echo !7"]]
- , ["*\\!*", ["echo !7"], null, ["echo !7"]]
- , ["*.\\*", ["r.*"], null, ["r.*"]]
- , ["a[b]c", ["abc"]]
- , ["a[\\b]c", ["abc"]]
- , ["a?c", ["abc"]]
- , ["a\\*c", [], {null: true}, ["abc"]]
- , ["", [""], { null: true }, [""]]
-
- , "http://www.opensource.apple.com/source/bash/bash-23/" +
- "bash/tests/glob-test"
- , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
- , ["*/man*/bash.*", ["man/man1/bash.1"]]
- , ["man/man1/bash.1", ["man/man1/bash.1"]]
- , ["a***c", ["abc"], null, ["abc"]]
- , ["a*****?c", ["abc"], null, ["abc"]]
- , ["?*****??", ["abc"], null, ["abc"]]
- , ["*****??", ["abc"], null, ["abc"]]
- , ["?*****?c", ["abc"], null, ["abc"]]
- , ["?***?****c", ["abc"], null, ["abc"]]
- , ["?***?****?", ["abc"], null, ["abc"]]
- , ["?***?****", ["abc"], null, ["abc"]]
- , ["*******c", ["abc"], null, ["abc"]]
- , ["*******?", ["abc"], null, ["abc"]]
- , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["[-abc]", ["-"], null, ["-"]]
- , ["[abc-]", ["-"], null, ["-"]]
- , ["\\", ["\\"], null, ["\\"]]
- , ["[\\\\]", ["\\"], null, ["\\"]]
- , ["[[]", ["["], null, ["["]]
- , ["[", ["["], null, ["["]]
- , ["[*", ["[abc"], null, ["[abc"]]
- , "a right bracket shall lose its special meaning and\n" +
- "represent itself in a bracket expression if it occurs\n" +
- "first in the list. -- POSIX.2 2.8.3.2"
- , ["[]]", ["]"], null, ["]"]]
- , ["[]-]", ["]"], null, ["]"]]
- , ["[a-\z]", ["p"], null, ["p"]]
- , ["??**********?****?", [], { null: true }, ["abc"]]
- , ["??**********?****c", [], { null: true }, ["abc"]]
- , ["?************c****?****", [], { null: true }, ["abc"]]
- , ["*c*?**", [], { null: true }, ["abc"]]
- , ["a*****c*?**", [], { null: true }, ["abc"]]
- , ["a********???*******", [], { null: true }, ["abc"]]
- , ["[]", [], { null: true }, ["a"]]
- , ["[abc", [], { null: true }, ["["]]
-
- , "nocase tests"
- , ["XYZ", ["xYz"], { nocase: true, null: true }
- , ["xYz", "ABC", "IjK"]]
- , ["ab*", ["ABC"], { nocase: true, null: true }
- , ["xYz", "ABC", "IjK"]]
- , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
- , ["xYz", "ABC", "IjK"]]
-
- // [ pattern, [matches], MM opts, files, TAP opts]
- , "onestar/twostar"
- , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
- , ["{/?,*}", ["/a", "bb"], {null: true}
- , ["/a", "/b/b", "/a/b/c", "bb"]]
-
- , "dots should not match unless requested"
- , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
-
- // .. and . can only match patterns starting with .,
- // even when options.dot is set.
- , function () {
- files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
- }
- , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
- , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
- , ["a/*/b", ["a/c/b"], {dot:false}]
- , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
-
-
- // this also tests that changing the options needs
- // to change the cache key, even if the pattern is
- // the same!
- , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
- , [ ".a/.d", "a/.d", "a/b"]]
-
- , "paren sets cannot contain slashes"
- , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
-
- // brace sets trump all else.
- //
- // invalid glob pattern. fails on bash4 and bsdglob.
- // however, in this implementation, it's easier just
- // to do the intuitive thing, and let brace-expansion
- // actually come before parsing any extglob patterns,
- // like the documentation seems to say.
- //
- // XXX: if anyone complains about this, either fix it
- // or tell them to grow up and stop complaining.
- //
- // bash/bsdglob says this:
- // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
- // but we do this instead:
- , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
-
- // test partial parsing in the presence of comment/negation chars
- , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
- , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
-
- // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
- , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
- , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
- , {}
- , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
-
-
- // crazy nested {,,} and *(||) tests.
- , function () {
- files = [ "a", "b", "c", "d"
- , "ab", "ac", "ad"
- , "bc", "cb"
- , "bc,d", "c,db", "c,d"
- , "d)", "(b|c", "*(b|c"
- , "b|c", "b|cc", "cb|c"
- , "x(a|b|c)", "x(a|c)"
- , "(a|b|c)", "(a|c)"]
- }
- , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
- , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
- // a
- // *(b|c)
- // *(b|d)
- , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
- , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
-
-
- // test various flag settings.
- , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
- , { noext: true } ]
- , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
- , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
- , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
-
-
- // begin channelling Boole and deMorgan...
- , "negation tests"
- , function () {
- files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
- }
-
- // anything that is NOT a* matches.
- , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
-
- // anything that IS !a* matches.
- , ["!a*", ["!ab", "!abc"], {nonegate: true}]
-
- // anything that IS a* matches
- , ["!!a*", ["a!b"]]
-
- // anything that is NOT !a* matches
- , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
-
- // negation nestled within a pattern
- , function () {
- files = [ "foo.js"
- , "foo.bar"
- // can't match this one without negative lookbehind.
- , "foo.js.js"
- , "blar.js"
- , "foo."
- , "boo.js.boo" ]
- }
- , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
-
- ].forEach(function (c) {
- if (typeof c === "function") return c()
- if (typeof c === "string") return t.comment(c)
-
- var pattern = c[0]
- , expect = c[1].sort(alpha)
- , options = c[2] || {}
- , f = c[3] || files
- , tapOpts = c[4] || {}
-
- // options.debug = true
- var m = new mm.Minimatch(pattern, options)
- var r = m.makeRe()
- tapOpts.re = String(r) || JSON.stringify(r)
- tapOpts.files = JSON.stringify(f)
- tapOpts.pattern = pattern
- tapOpts.set = m.set
- tapOpts.negated = m.negate
-
- var actual = mm.match(f, pattern, options)
- actual.sort(alpha)
-
- t.equivalent( actual, expect
- , JSON.stringify(pattern) + " " + JSON.stringify(expect)
- , tapOpts )
- })
-
- t.comment("time=" + (Date.now() - start) + "ms")
- t.end()
-})
-
-tap.test("global leak test", function (t) {
- var globalAfter = Object.keys(global)
- t.equivalent(globalAfter, globalBefore, "no new globals, please")
- t.end()
-})
-
-function alpha (a, b) {
- return a > b ? 1 : -1
-}
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js
deleted file mode 100644
index 7ee278a274..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/test/brace-expand.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var tap = require("tap")
- , minimatch = require("../")
-
-tap.test("brace expansion", function (t) {
- // [ pattern, [expanded] ]
- ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
- , [ "abxy"
- , "abxz"
- , "acdxy"
- , "acdxz"
- , "acexy"
- , "acexz"
- , "afhxy"
- , "afhxz"
- , "aghxy"
- , "aghxz" ] ]
- , [ "a{1..5}b"
- , [ "a1b"
- , "a2b"
- , "a3b"
- , "a4b"
- , "a5b" ] ]
- , [ "a{b}c", ["a{b}c"] ]
- ].forEach(function (tc) {
- var p = tc[0]
- , expect = tc[1]
- t.equivalent(minimatch.braceExpand(p), expect, p)
- })
- console.error("ending")
- t.end()
-})
-
-
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js
deleted file mode 100644
index 0fec4b0fad..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/test/caching.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var Minimatch = require("../minimatch.js").Minimatch
-var tap = require("tap")
-tap.test("cache test", function (t) {
- var mm1 = new Minimatch("a?b")
- var mm2 = new Minimatch("a?b")
- t.equal(mm1, mm2, "should get the same object")
- // the lru should drop it after 100 entries
- for (var i = 0; i < 100; i ++) {
- new Minimatch("a"+i)
- }
- mm2 = new Minimatch("a?b")
- t.notEqual(mm1, mm2, "cache should have dropped")
- t.end()
-})
diff --git a/tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js b/tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js
deleted file mode 100644
index 25f1f601cd..0000000000
--- a/tools/blog/node_modules/glob/node_modules/minimatch/test/defaults.js
+++ /dev/null
@@ -1,274 +0,0 @@
-// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
-//
-// TODO: Some of these tests do very bad things with backslashes, and will
-// most likely fail badly on windows. They should probably be skipped.
-
-var tap = require("tap")
- , globalBefore = Object.keys(global)
- , mm = require("../")
- , files = [ "a", "b", "c", "d", "abc"
- , "abd", "abe", "bb", "bcd"
- , "ca", "cb", "dd", "de"
- , "bdir/", "bdir/cfile"]
- , next = files.concat([ "a-b", "aXb"
- , ".x", ".y" ])
-
-tap.test("basic tests", function (t) {
- var start = Date.now()
-
- // [ pattern, [matches], MM opts, files, TAP opts]
- ; [ "http://www.bashcookbook.com/bashinfo" +
- "/source/bash-1.14.7/tests/glob-test"
- , ["a*", ["a", "abc", "abd", "abe"]]
- , ["X*", ["X*"], {nonull: true}]
-
- // allow null glob expansion
- , ["X*", []]
-
- // isaacs: Slightly different than bash/sh/ksh
- // \\* is not un-escaped to literal "*" in a failed match,
- // but it does make it get treated as a literal star
- , ["\\*", ["\\*"], {nonull: true}]
- , ["\\**", ["\\**"], {nonull: true}]
- , ["\\*\\*", ["\\*\\*"], {nonull: true}]
-
- , ["b*/", ["bdir/"]]
- , ["c*", ["c", "ca", "cb"]]
- , ["**", files]
-
- , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
- , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
-
- , "legendary larry crashes bashes"
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
- , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
-
- , "character classes"
- , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
- , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
- "bdir/", "ca", "cb", "dd", "de"]]
- , ["a*[^c]", ["abd", "abe"]]
- , function () { files.push("a-b", "aXb") }
- , ["a[X-]b", ["a-b", "aXb"]]
- , function () { files.push(".x", ".y") }
- , ["[^a-c]*", ["d", "dd", "de"]]
- , function () { files.push("a*b/", "a*b/ooo") }
- , ["a\\*b/*", ["a*b/ooo"]]
- , ["a\\*?/*", ["a*b/ooo"]]
- , ["*\\\\!*", [], {null: true}, ["echo !7"]]
- , ["*\\!*", ["echo !7"], null, ["echo !7"]]
- , ["*.\\*", ["r.*"], null, ["r.*"]]
- , ["a[b]c", ["abc"]]
- , ["a[\\b]c", ["abc"]]
- , ["a?c", ["abc"]]
- , ["a\\*c", [], {null: true}, ["abc"]]
- , ["", [""], { null: true }, [""]]
-
- , "http://www.opensource.apple.com/source/bash/bash-23/" +
- "bash/tests/glob-test"
- , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
- , ["*/man*/bash.*", ["man/man1/bash.1"]]
- , ["man/man1/bash.1", ["man/man1/bash.1"]]
- , ["a***c", ["abc"], null, ["abc"]]
- , ["a*****?c", ["abc"], null, ["abc"]]
- , ["?*****??", ["abc"], null, ["abc"]]
- , ["*****??", ["abc"], null, ["abc"]]
- , ["?*****?c", ["abc"], null, ["abc"]]
- , ["?***?****c", ["abc"], null, ["abc"]]
- , ["?***?****?", ["abc"], null, ["abc"]]
- , ["?***?****", ["abc"], null, ["abc"]]
- , ["*******c", ["abc"], null, ["abc"]]
- , ["*******?", ["abc"], null, ["abc"]]
- , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
- , ["[-abc]", ["-"], null, ["-"]]
- , ["[abc-]", ["-"], null, ["-"]]
- , ["\\", ["\\"], null, ["\\"]]
- , ["[\\\\]", ["\\"], null, ["\\"]]
- , ["[[]", ["["], null, ["["]]
- , ["[", ["["], null, ["["]]
- , ["[*", ["[abc"], null, ["[abc"]]
- , "a right bracket shall lose its special meaning and\n" +
- "represent itself in a bracket expression if it occurs\n" +
- "first in the list. -- POSIX.2 2.8.3.2"
- , ["[]]", ["]"], null, ["]"]]
- , ["[]-]", ["]"], null, ["]"]]
- , ["[a-\z]", ["p"], null, ["p"]]
- , ["??**********?****?", [], { null: true }, ["abc"]]
- , ["??**********?****c", [], { null: true }, ["abc"]]
- , ["?************c****?****", [], { null: true }, ["abc"]]
- , ["*c*?**", [], { null: true }, ["abc"]]
- , ["a*****c*?**", [], { null: true }, ["abc"]]
- , ["a********???*******", [], { null: true }, ["abc"]]
- , ["[]", [], { null: true }, ["a"]]
- , ["[abc", [], { null: true }, ["["]]
-
- , "nocase tests"
- , ["XYZ", ["xYz"], { nocase: true, null: true }
- , ["xYz", "ABC", "IjK"]]
- , ["ab*", ["ABC"], { nocase: true, null: true }
- , ["xYz", "ABC", "IjK"]]
- , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
- , ["xYz", "ABC", "IjK"]]
-
- // [ pattern, [matches], MM opts, files, TAP opts]
- , "onestar/twostar"
- , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
- , ["{/?,*}", ["/a", "bb"], {null: true}
- , ["/a", "/b/b", "/a/b/c", "bb"]]
-
- , "dots should not match unless requested"
- , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
-
- // .. and . can only match patterns starting with .,
- // even when options.dot is set.
- , function () {
- files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
- }
- , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
- , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
- , ["a/*/b", ["a/c/b"], {dot:false}]
- , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
-
-
- // this also tests that changing the options needs
- // to change the cache key, even if the pattern is
- // the same!
- , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
- , [ ".a/.d", "a/.d", "a/b"]]
-
- , "paren sets cannot contain slashes"
- , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
-
- // brace sets trump all else.
- //
- // invalid glob pattern. fails on bash4 and bsdglob.
- // however, in this implementation, it's easier just
- // to do the intuitive thing, and let brace-expansion
- // actually come before parsing any extglob patterns,
- // like the documentation seems to say.
- //
- // XXX: if anyone complains about this, either fix it
- // or tell them to grow up and stop complaining.
- //
- // bash/bsdglob says this:
- // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
- // but we do this instead:
- , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
-
- // test partial parsing in the presence of comment/negation chars
- , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
- , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
-
- // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
- , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
- , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
- , {}
- , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
-
-
- // crazy nested {,,} and *(||) tests.
- , function () {
- files = [ "a", "b", "c", "d"
- , "ab", "ac", "ad"
- , "bc", "cb"
- , "bc,d", "c,db", "c,d"
- , "d)", "(b|c", "*(b|c"
- , "b|c", "b|cc", "cb|c"
- , "x(a|b|c)", "x(a|c)"
- , "(a|b|c)", "(a|c)"]
- }
- , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
- , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
- // a
- // *(b|c)
- // *(b|d)
- , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
- , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
-
-
- // test various flag settings.
- , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
- , { noext: true } ]
- , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
- , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
- , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
-
-
- // begin channelling Boole and deMorgan...
- , "negation tests"
- , function () {
- files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
- }
-
- // anything that is NOT a* matches.
- , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
-
- // anything that IS !a* matches.
- , ["!a*", ["!ab", "!abc"], {nonegate: true}]
-
- // anything that IS a* matches
- , ["!!a*", ["a!b"]]
-
- // anything that is NOT !a* matches
- , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
-
- // negation nestled within a pattern
- , function () {
- files = [ "foo.js"
- , "foo.bar"
- // can't match this one without negative lookbehind.
- , "foo.js.js"
- , "blar.js"
- , "foo."
- , "boo.js.boo" ]
- }
- , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
-
- ].forEach(function (c) {
- if (typeof c === "function") return c()
- if (typeof c === "string") return t.comment(c)
-
- var pattern = c[0]
- , expect = c[1].sort(alpha)
- , options = c[2] || {}
- , f = c[3] || files
- , tapOpts = c[4] || {}
-
- // options.debug = true
- var Class = mm.defaults(options).Minimatch
- var m = new Class(pattern, {})
- var r = m.makeRe()
- tapOpts.re = String(r) || JSON.stringify(r)
- tapOpts.files = JSON.stringify(f)
- tapOpts.pattern = pattern
- tapOpts.set = m.set
- tapOpts.negated = m.negate
-
- var actual = mm.match(f, pattern, options)
- actual.sort(alpha)
-
- t.equivalent( actual, expect
- , JSON.stringify(pattern) + " " + JSON.stringify(expect)
- , tapOpts )
- })
-
- t.comment("time=" + (Date.now() - start) + "ms")
- t.end()
-})
-
-tap.test("global leak test", function (t) {
- var globalAfter = Object.keys(global)
- t.equivalent(globalAfter, globalBefore, "no new globals, please")
- t.end()
-})
-
-function alpha (a, b) {
- return a > b ? 1 : -1
-}
diff --git a/tools/blog/node_modules/glob/package.json b/tools/blog/node_modules/glob/package.json
deleted file mode 100644
index 2fddfd4626..0000000000
--- a/tools/blog/node_modules/glob/package.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "name": "glob",
- "description": "This is a glob implementation in JavaScript. It uses the `minimatch` library to do its matching.",
- "version": "3.1.10",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-glob.git"
- },
- "main": "glob.js",
- "engines": {
- "node": "*"
- },
- "dependencies": {
- "minimatch": "0.2",
- "graceful-fs": "~1.1.2",
- "inherits": "1"
- },
- "devDependencies": {
- "tap": "~0.2.3",
- "mkdirp": "0",
- "rimraf": "1"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "license": "BSD",
- "readme": "# Glob\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n",
- "_id": "glob@3.1.10",
- "_from": "glob"
-}
diff --git a/tools/blog/node_modules/glob/test/00-setup.js b/tools/blog/node_modules/glob/test/00-setup.js
deleted file mode 100644
index 2b606432a1..0000000000
--- a/tools/blog/node_modules/glob/test/00-setup.js
+++ /dev/null
@@ -1,61 +0,0 @@
-// just a little pre-run script to set up the fixtures.
-// zz-finish cleans it up
-
-var mkdirp = require("mkdirp")
-var path = require("path")
-var i = 0
-var tap = require("tap")
-var fs = require("fs")
-var rimraf = require("rimraf")
-
-var files =
-[ "a/.abcdef/x/y/z/a"
-, "a/abcdef/g/h"
-, "a/abcfed/g/h"
-, "a/b/c/d"
-, "a/bc/e/f"
-, "a/c/d/c/b"
-, "a/cb/e/f"
-]
-
-var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
-var symlinkFrom = "../.."
-
-files = files.map(function (f) {
- return path.resolve(__dirname, f)
-})
-
-tap.test("remove fixtures", function (t) {
- rimraf(path.resolve(__dirname, "a"), function (er) {
- t.ifError(er, "remove fixtures")
- t.end()
- })
-})
-
-files.forEach(function (f) {
- tap.test(f, function (t) {
- var d = path.dirname(f)
- mkdirp(d, 0755, function (er) {
- if (er) {
- t.fail(er)
- return t.bailout()
- }
- fs.writeFile(f, "i like tests", function (er) {
- t.ifError(er, "make file")
- t.end()
- })
- })
- })
-})
-
-tap.test("symlinky", function (t) {
- var d = path.dirname(symlinkTo)
- console.error("mkdirp", d)
- mkdirp(d, 0755, function (er) {
- t.ifError(er)
- fs.symlink(symlinkFrom, symlinkTo, function (er) {
- t.ifError(er, "make symlink")
- t.end()
- })
- })
-})
diff --git a/tools/blog/node_modules/glob/test/bash-comparison.js b/tools/blog/node_modules/glob/test/bash-comparison.js
deleted file mode 100644
index fbadc314cc..0000000000
--- a/tools/blog/node_modules/glob/test/bash-comparison.js
+++ /dev/null
@@ -1,119 +0,0 @@
-// basic test
-// show that it does the same thing by default as the shell.
-var tap = require("tap")
-, child_process = require("child_process")
-
-// put more patterns here.
-, globs =
- [
- "test/a/*/+(c|g)/./d"
- ,"test/a/**/[cg]/../[cg]"
- ,"test/a/{b,c,d,e,f}/**/g"
- ,"test/a/b/**"
- ,"test/**/g"
- ,"test/a/abc{fed,def}/g/h"
- ,"test/a/abc{fed/g,def}/**/"
- ,"test/a/abc{fed/g,def}/**///**/"
- ,"test/**/a/**/"
- ,"test/+(a|b|c)/a{/,bc*}/**"
- ,"test/*/*/*/f"
- ,"test/**/f"
- ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
- ,"{./*/*,/usr/local/*}"
- ,"{/*,*}" // evil owl face! how you taunt me!
- ]
-, glob = require("../")
-, path = require("path")
-
-// run from the root of the project
-// this is usually where you're at anyway, but be sure.
-process.chdir(path.resolve(__dirname, ".."))
-
-function alphasort (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return a > b ? 1 : a < b ? -1 : 0
-}
-
-globs.forEach(function (pattern) {
- var echoOutput
- tap.test(pattern, function (t) {
- var bashPattern = pattern
- , cmd = "shopt -s globstar && " +
- "shopt -s extglob && " +
- "shopt -s nullglob && " +
- // "shopt >&2; " +
- "eval \'for i in " + bashPattern + "; do echo $i; done\'"
- , cp = child_process.spawn("bash", ["-c",cmd])
- , out = []
- , globResult
- cp.stdout.on("data", function (c) {
- out.push(c)
- })
- cp.stderr.on("data", function (c) {
- process.stderr.write(c)
- })
- cp.stdout.on("close", function () {
- echoOutput = flatten(out)
- if (!echoOutput) echoOutput = []
- else {
- echoOutput = echoOutput.split(/\r*\n/).map(function (m) {
- // Bash is a oddly inconsistent with slashes in the
- // the results. This implementation is a bit more
- // normalized. Account for this in the test results.
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).sort(alphasort)
- }
- next()
- })
-
- glob(pattern, function (er, matches) {
- // sort and unpark, just to match the shell results
- matches = matches.map(function (m) {
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).sort(alphasort)
-
- t.ifError(er, pattern + " should not error")
- globResult = matches
- next()
- })
-
- function next () {
- if (!echoOutput || !globResult) return
-
- t.deepEqual(globResult, echoOutput, "should match shell")
- t.end()
- }
- })
-
- tap.test(pattern + " sync", function (t) {
- var matches = glob.sync(pattern).map(function (m) {
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).sort(alphasort)
-
- t.deepEqual(matches, echoOutput, "should match shell")
- t.end()
- })
-})
-
-function flatten (chunks) {
- var s = 0
- chunks.forEach(function (c) { s += c.length })
- var out = new Buffer(s)
- s = 0
- chunks.forEach(function (c) {
- c.copy(out, s)
- s += c.length
- })
-
- return out.toString().trim()
-}
diff --git a/tools/blog/node_modules/glob/test/cwd-test.js b/tools/blog/node_modules/glob/test/cwd-test.js
deleted file mode 100644
index 352c27efad..0000000000
--- a/tools/blog/node_modules/glob/test/cwd-test.js
+++ /dev/null
@@ -1,55 +0,0 @@
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname)
-
-tap.test("changing cwd and searching for **/d", function (t) {
- var glob = require('../')
- var path = require('path')
- t.test('.', function (t) {
- glob('**/d', function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
- t.end()
- })
- })
-
- t.test('a', function (t) {
- glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'b/c/d', 'c/d' ])
- t.end()
- })
- })
-
- t.test('a/b', function (t) {
- glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'c/d' ])
- t.end()
- })
- })
-
- t.test('a/b/', function (t) {
- glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'c/d' ])
- t.end()
- })
- })
-
- t.test('.', function (t) {
- glob('**/d', {cwd: process.cwd()}, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
- t.end()
- })
- })
-
- t.test('cd -', function (t) {
- process.chdir(origCwd)
- t.end()
- })
-
- t.end()
-})
diff --git a/tools/blog/node_modules/glob/test/mark.js b/tools/blog/node_modules/glob/test/mark.js
deleted file mode 100644
index fda66f8d2a..0000000000
--- a/tools/blog/node_modules/glob/test/mark.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var test = require("tap").test
-var glob = require('../')
-process.chdir(__dirname)
-
-test("mark, no / on pattern", function (t) {
- glob("a/*", {mark: true}, function (er, results) {
- if (er)
- throw er
- t.same(results, [ 'a/abcdef/',
- 'a/abcfed/',
- 'a/b/',
- 'a/bc/',
- 'a/c/',
- 'a/cb/',
- 'a/symlink/' ])
- t.end()
- })
-})
-
-test("mark=false, no / on pattern", function (t) {
- glob("a/*", function (er, results) {
- if (er)
- throw er
- t.same(results, [ 'a/abcdef',
- 'a/abcfed',
- 'a/b',
- 'a/bc',
- 'a/c',
- 'a/cb',
- 'a/symlink' ])
- t.end()
- })
-})
-
-test("mark=true, / on pattern", function (t) {
- glob("a/*/", {mark: true}, function (er, results) {
- if (er)
- throw er
- t.same(results, [ 'a/abcdef/',
- 'a/abcfed/',
- 'a/b/',
- 'a/bc/',
- 'a/c/',
- 'a/cb/',
- 'a/symlink/' ])
- t.end()
- })
-})
-
-test("mark=false, / on pattern", function (t) {
- glob("a/*/", function (er, results) {
- if (er)
- throw er
- t.same(results, [ 'a/abcdef/',
- 'a/abcfed/',
- 'a/b/',
- 'a/bc/',
- 'a/c/',
- 'a/cb/',
- 'a/symlink/' ])
- t.end()
- })
-})
diff --git a/tools/blog/node_modules/glob/test/pause-resume.js b/tools/blog/node_modules/glob/test/pause-resume.js
deleted file mode 100644
index 481d1aae4c..0000000000
--- a/tools/blog/node_modules/glob/test/pause-resume.js
+++ /dev/null
@@ -1,98 +0,0 @@
-// show that no match events happen while paused.
-var tap = require("tap")
-, child_process = require("child_process")
-// just some gnarly pattern with lots of matches
-, pattern = "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
-, glob = require("../")
-, Glob = glob.Glob
-, path = require("path")
-
-// run from the root of the project
-// this is usually where you're at anyway, but be sure.
-process.chdir(path.resolve(__dirname, ".."))
-
-function alphasort (a, b) {
- a = a.toLowerCase()
- b = b.toLowerCase()
- return a > b ? 1 : a < b ? -1 : 0
-}
-
-function cleanResults (m) {
- // normalize discrepancies in ordering, duplication,
- // and ending slashes.
- return m.map(function (m) {
- return m.replace(/\/+/g, "/").replace(/\/$/, "")
- }).sort(alphasort).reduce(function (set, f) {
- if (f !== set[set.length - 1]) set.push(f)
- return set
- }, []).sort(alphasort)
-}
-
-function flatten (chunks) {
- var s = 0
- chunks.forEach(function (c) { s += c.length })
- var out = new Buffer(s)
- s = 0
- chunks.forEach(function (c) {
- c.copy(out, s)
- s += c.length
- })
-
- return out.toString().trim()
-}
-var bashResults
-tap.test("get bash output", function (t) {
- var bashPattern = pattern
- , cmd = "shopt -s globstar && " +
- "shopt -s extglob && " +
- "shopt -s nullglob && " +
- // "shopt >&2; " +
- "eval \'for i in " + bashPattern + "; do echo $i; done\'"
- , cp = child_process.spawn("bash", ["-c",cmd])
- , out = []
- , globResult
- cp.stdout.on("data", function (c) {
- out.push(c)
- })
- cp.stderr.on("data", function (c) {
- process.stderr.write(c)
- })
- cp.stdout.on("close", function () {
- bashResults = flatten(out)
- if (!bashResults) return t.fail("Didn't get results from bash")
- else {
- bashResults = cleanResults(bashResults.split(/\r*\n/))
- }
- t.ok(bashResults.length, "got some results")
- t.end()
- })
-})
-
-var globResults = []
-tap.test("use a Glob object, and pause/resume it", function (t) {
- var g = new Glob(pattern)
- , paused = false
- , res = []
-
- g.on("match", function (m) {
- t.notOk(g.paused, "must not be paused")
- globResults.push(m)
- g.pause()
- t.ok(g.paused, "must be paused")
- setTimeout(g.resume.bind(g), 1)
- })
-
- g.on("end", function (matches) {
- t.pass("reached glob end")
- globResults = cleanResults(globResults)
- matches = cleanResults(matches)
- t.deepEqual(matches, globResults,
- "end event matches should be the same as match events")
-
- t.deepEqual(matches, bashResults,
- "glob matches should be the same as bash results")
-
- t.end()
- })
-})
-
diff --git a/tools/blog/node_modules/glob/test/root-nomount.js b/tools/blog/node_modules/glob/test/root-nomount.js
deleted file mode 100644
index 3ac5979b05..0000000000
--- a/tools/blog/node_modules/glob/test/root-nomount.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname)
-
-tap.test("changing root and searching for /b*/**", function (t) {
- var glob = require('../')
- var path = require('path')
- t.test('.', function (t) {
- glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [])
- t.end()
- })
- })
-
- t.test('a', function (t) {
- glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
- t.end()
- })
- })
-
- t.test('root=a, cwd=a/b', function (t) {
- glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
- t.end()
- })
- })
-
- t.test('cd -', function (t) {
- process.chdir(origCwd)
- t.end()
- })
-
- t.end()
-})
diff --git a/tools/blog/node_modules/glob/test/root.js b/tools/blog/node_modules/glob/test/root.js
deleted file mode 100644
index 5ccdd0e947..0000000000
--- a/tools/blog/node_modules/glob/test/root.js
+++ /dev/null
@@ -1,43 +0,0 @@
-var tap = require("tap")
-
-var origCwd = process.cwd()
-process.chdir(__dirname)
-
-tap.test("changing root and searching for /b*/**", function (t) {
- var glob = require('../')
- var path = require('path')
- t.test('.', function (t) {
- glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [])
- t.end()
- })
- })
-
- t.test('a', function (t) {
- glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
- return path.join(path.resolve('a'), m)
- }))
- t.end()
- })
- })
-
- t.test('root=a, cwd=a/b', function (t) {
- glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
- t.ifError(er)
- t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
- return path.join(path.resolve('a'), m)
- }))
- t.end()
- })
- })
-
- t.test('cd -', function (t) {
- process.chdir(origCwd)
- t.end()
- })
-
- t.end()
-})
diff --git a/tools/blog/node_modules/glob/test/zz-cleanup.js b/tools/blog/node_modules/glob/test/zz-cleanup.js
deleted file mode 100644
index e085f0fa77..0000000000
--- a/tools/blog/node_modules/glob/test/zz-cleanup.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// remove the fixtures
-var tap = require("tap")
-, rimraf = require("rimraf")
-, path = require("path")
-
-tap.test("cleanup fixtures", function (t) {
- rimraf(path.resolve(__dirname, "a"), function (er) {
- t.ifError(er, "removed")
- t.end()
- })
-})
diff --git a/tools/blog/node_modules/marked/.npmignore b/tools/blog/node_modules/marked/.npmignore
deleted file mode 100644
index 3fb773c034..0000000000
--- a/tools/blog/node_modules/marked/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.git*
-test/
diff --git a/tools/blog/node_modules/marked/LICENSE b/tools/blog/node_modules/marked/LICENSE
deleted file mode 100644
index 40597477c6..0000000000
--- a/tools/blog/node_modules/marked/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/)
-
-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.
diff --git a/tools/blog/node_modules/marked/Makefile b/tools/blog/node_modules/marked/Makefile
deleted file mode 100644
index 76904000b5..0000000000
--- a/tools/blog/node_modules/marked/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-all:
- @cp lib/marked.js marked.js
- @uglifyjs -o marked.min.js marked.js
-
-clean:
- @rm marked.js
- @rm marked.min.js
-
-.PHONY: clean all
diff --git a/tools/blog/node_modules/marked/README.md b/tools/blog/node_modules/marked/README.md
deleted file mode 100644
index c10495ae69..0000000000
--- a/tools/blog/node_modules/marked/README.md
+++ /dev/null
@@ -1,125 +0,0 @@
-# marked
-
-A full-featured markdown parser and compiler, written in javascript.
-Built for speed.
-
-## Benchmarks
-
-node v0.4.x
-
-``` bash
-$ node test --bench
-marked completed in 12071ms.
-showdown (reuse converter) completed in 27387ms.
-showdown (new converter) completed in 75617ms.
-markdown-js completed in 70069ms.
-```
-
-node v0.6.x
-
-``` bash
-$ node test --bench
-marked completed in 6448ms.
-marked (gfm) completed in 7357ms.
-marked (pedantic) completed in 6092ms.
-discount completed in 7314ms.
-showdown (reuse converter) completed in 16018ms.
-showdown (new converter) completed in 18234ms.
-markdown-js completed in 24270ms.
-```
-
-__Marked is now faster than Discount, which is written in C.__
-
-For those feeling skeptical: These benchmarks run the entire markdown test suite
-1000 times. The test suite tests every feature. It doesn't cater to specific
-aspects.
-
-## Install
-
-``` bash
-$ npm install marked
-```
-
-## Another Javascript Markdown Parser
-
-The point of marked was to create a markdown compiler where it was possible to
-frequently parse huge chunks of markdown without having to worry about
-caching the compiled output somehow...or blocking for an unnecesarily long time.
-
-marked is very concise and still implements all markdown features. It is also
-now fully compatible with the client-side.
-
-marked more or less passes the official markdown test suite in its
-entirety. This is important because a surprising number of markdown compilers
-cannot pass more than a few tests. It was very difficult to get marked as
-compliant as it is. It could have cut corners in several areas for the sake
-of performance, but did not in order to be exactly what you expect in terms
-of a markdown rendering. In fact, this is why marked could be considered at a
-disadvantage in the benchmarks above.
-
-Along with implementing every markdown feature, marked also implements
-[GFM features](http://github.github.com/github-flavored-markdown/).
-
-## Options
-
-marked has 4 different switches which change behavior.
-
-- __pedantic__: Conform to obscure parts of `markdown.pl` as much as possible.
- Don't fix any of the original markdown bugs or poor behavior.
-- __gfm__: Enable github flavored markdown (enabled by default).
-- __sanitize__: Sanitize the output. Ignore any HTML that has been input.
-- __highlight__: A callback to highlight code blocks.
-
-None of the above are mutually exclusive/inclusive.
-
-## Usage
-
-``` js
-// Set default options
-marked.setOptions({
- gfm: true,
- pedantic: false,
- sanitize: true,
- // callback for code highlighter
- highlight: function(code, lang) {
- if (lang === 'js') {
- return javascriptHighlighter(code);
- }
- return code;
- }
-});
-console.log(marked('i am using __markdown__.'));
-```
-
-You also have direct access to the lexer and parser if you so desire.
-
-``` js
-var tokens = marked.lexer(text);
-console.log(marked.parser(tokens));
-```
-
-``` bash
-$ node
-> require('marked').lexer('> i am using marked.')
-[ { type: 'blockquote_start' },
- { type: 'paragraph',
- text: 'i am using marked.' },
- { type: 'blockquote_end' },
- links: {} ]
-```
-
-## CLI
-
-``` bash
-$ marked -o hello.html
-hello world
-^D
-$ cat hello.html
-<p>hello world</p>
-```
-
-## License
-
-Copyright (c) 2011-2012, Christopher Jeffrey. (MIT License)
-
-See LICENSE for more info.
diff --git a/tools/blog/node_modules/marked/bin/marked b/tools/blog/node_modules/marked/bin/marked
deleted file mode 100755
index c27b9e2612..0000000000
--- a/tools/blog/node_modules/marked/bin/marked
+++ /dev/null
@@ -1,127 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * Marked CLI
- * Copyright (c) 2011-2012, Christopher Jeffrey (MIT License)
- */
-
-var fs = require('fs')
- , util = require('util')
- , marked = require('../');
-
-/**
- * Man Page
- */
-
-var help = function() {
- var spawn = require('child_process').spawn;
-
- var options = {
- cwd: process.cwd(),
- env: process.env,
- setsid: false,
- customFds: [0, 1, 2]
- };
-
- spawn('man',
- [__dirname + '/../man/marked.1'],
- options);
-};
-
-/**
- * Main
- */
-
-var main = function(argv) {
- var files = []
- , options = {}
- , data = ''
- , input
- , output
- , arg
- , tokens;
-
- var getarg = function() {
- var arg = argv.shift();
- arg = arg.split('=');
- if (arg.length > 1) {
- argv.unshift(arg.slice(1).join('='));
- }
- return arg[0];
- };
-
- while (argv.length) {
- arg = getarg();
- switch (arg) {
- case '-o':
- case '--output':
- output = argv.shift();
- break;
- case '-i':
- case '--input':
- input = argv.shift();
- break;
- case '-t':
- case '--tokens':
- tokens = true;
- break;
- case '--gfm':
- options.gfm = true;
- break;
- case '--sanitize':
- options.sanitize = true;
- break;
- case '--pedantic':
- options.pedantic = true;
- break;
- case '-h':
- case '--help':
- return help();
- default:
- files.push(arg);
- break;
- }
- }
-
- if (!input) {
- if (files.length <= 2) {
- var stdin = process.stdin;
-
- stdin.setEncoding('utf8');
- stdin.resume();
-
- stdin.on('data', function(text) {
- data += text;
- });
-
- stdin.on('end', write);
-
- return;
- }
- input = files.pop();
- }
-
- data = fs.readFileSync(input, 'utf8');
- write();
-
- function write() {
- marked.setOptions(options);
-
- data = tokens
- ? JSON.stringify(marked.lexer(data), null, 2)
- : marked(data);
-
- if (!output) {
- process.stdout.write(data + '\n');
- } else {
- fs.writeFileSync(output, data);
- }
- }
-};
-
-if (!module.parent) {
- process.title = 'marked';
- main(process.argv.slice());
-} else {
- module.exports = main;
-}
diff --git a/tools/blog/node_modules/marked/index.js b/tools/blog/node_modules/marked/index.js
deleted file mode 100644
index a12f90569f..0000000000
--- a/tools/blog/node_modules/marked/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/marked');
diff --git a/tools/blog/node_modules/marked/lib/marked.js b/tools/blog/node_modules/marked/lib/marked.js
deleted file mode 100644
index 9156bf38b0..0000000000
--- a/tools/blog/node_modules/marked/lib/marked.js
+++ /dev/null
@@ -1,791 +0,0 @@
-/**
- * marked - A markdown parser (https://github.com/chjj/marked)
- * Copyright (c) 2011-2012, Christopher Jeffrey. (MIT Licensed)
- */
-
-;(function() {
-
-/**
- * Block-Level Grammar
- */
-
-var block = {
- newline: /^\n+/,
- code: /^( {4}[^\n]+\n*)+/,
- fences: noop,
- hr: /^( *[-*_]){3,} *(?:\n+|$)/,
- heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
- lheading: /^([^\n]+)\n *(=|-){3,} *\n*/,
- blockquote: /^( *>[^\n]+(\n[^\n]+)*\n*)+/,
- list: /^( *)(bull) [^\0]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
- html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,
- def: /^ *\[([^\]]+)\]: *([^\s]+)(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
- paragraph: /^([^\n]+\n?(?!body))+\n*/,
- text: /^[^\n]+/
-};
-
-block.bullet = /(?:[*+-]|\d+\.)/;
-block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
-block.item = replace(block.item, 'gm')
- (/bull/g, block.bullet)
- ();
-
-block.list = replace(block.list)
- (/bull/g, block.bullet)
- ('hr', /\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/)
- ();
-
-block.html = replace(block.html)
- ('comment', /<!--[^\0]*?-->/)
- ('closed', /<(tag)[^\0]+?<\/\1>/)
- ('closing', /<tag(?!:\/|@)\b(?:"[^"]*"|'[^']*'|[^'">])*?>/)
- (/tag/g, tag())
- ();
-
-block.paragraph = (function() {
- var paragraph = block.paragraph.source
- , body = [];
-
- (function push(rule) {
- rule = block[rule] ? block[rule].source : rule;
- body.push(rule.replace(/(^|[^\[])\^/g, '$1'));
- return push;
- })
- ('hr')
- ('heading')
- ('lheading')
- ('blockquote')
- ('<' + tag())
- ('def');
-
- return new
- RegExp(paragraph.replace('body', body.join('|')));
-})();
-
-block.normal = {
- fences: block.fences,
- paragraph: block.paragraph
-};
-
-block.gfm = {
- fences: /^ *``` *(\w+)? *\n([^\0]+?)\s*``` *(?:\n+|$)/,
- paragraph: /^/
-};
-
-block.gfm.paragraph = replace(block.paragraph)
- ('(?!', '(?!' + block.gfm.fences.source.replace(/(^|[^\[])\^/g, '$1') + '|')
- ();
-
-/**
- * Block Lexer
- */
-
-block.lexer = function(src) {
- var tokens = [];
-
- tokens.links = {};
-
- src = src
- .replace(/\r\n|\r/g, '\n')
- .replace(/\t/g, ' ');
-
- return block.token(src, tokens, true);
-};
-
-block.token = function(src, tokens, top) {
- var src = src.replace(/^ +$/gm, '')
- , next
- , loose
- , cap
- , item
- , space
- , i
- , l;
-
- while (src) {
- // newline
- if (cap = block.newline.exec(src)) {
- src = src.substring(cap[0].length);
- if (cap[0].length > 1) {
- tokens.push({
- type: 'space'
- });
- }
- }
-
- // code
- if (cap = block.code.exec(src)) {
- src = src.substring(cap[0].length);
- cap = cap[0].replace(/^ {4}/gm, '');
- tokens.push({
- type: 'code',
- text: !options.pedantic
- ? cap.replace(/\n+$/, '')
- : cap
- });
- continue;
- }
-
- // fences (gfm)
- if (cap = block.fences.exec(src)) {
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'code',
- lang: cap[1],
- text: cap[2]
- });
- continue;
- }
-
- // heading
- if (cap = block.heading.exec(src)) {
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'heading',
- depth: cap[1].length,
- text: cap[2]
- });
- continue;
- }
-
- // lheading
- if (cap = block.lheading.exec(src)) {
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'heading',
- depth: cap[2] === '=' ? 1 : 2,
- text: cap[1]
- });
- continue;
- }
-
- // hr
- if (cap = block.hr.exec(src)) {
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'hr'
- });
- continue;
- }
-
- // blockquote
- if (cap = block.blockquote.exec(src)) {
- src = src.substring(cap[0].length);
-
- tokens.push({
- type: 'blockquote_start'
- });
-
- cap = cap[0].replace(/^ *> ?/gm, '');
-
- // Pass `top` to keep the current
- // "toplevel" state. This is exactly
- // how markdown.pl works.
- block.token(cap, tokens, top);
-
- tokens.push({
- type: 'blockquote_end'
- });
-
- continue;
- }
-
- // list
- if (cap = block.list.exec(src)) {
- src = src.substring(cap[0].length);
-
- tokens.push({
- type: 'list_start',
- ordered: isFinite(cap[2])
- });
-
- // Get each top-level item.
- cap = cap[0].match(block.item);
-
- next = false;
- l = cap.length;
- i = 0;
-
- for (; i < l; i++) {
- item = cap[i];
-
- // Remove the list item's bullet
- // so it is seen as the next token.
- space = item.length;
- item = item.replace(/^ *([*+-]|\d+\.) +/, '');
-
- // Outdent whatever the
- // list item contains. Hacky.
- if (~item.indexOf('\n ')) {
- space -= item.length;
- item = !options.pedantic
- ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
- : item.replace(/^ {1,4}/gm, '');
- }
-
- // Determine whether item is loose or not.
- // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
- // for discount behavior.
- loose = next || /\n\n(?!\s*$)/.test(item);
- if (i !== l - 1) {
- next = item[item.length-1] === '\n';
- if (!loose) loose = next;
- }
-
- tokens.push({
- type: loose
- ? 'loose_item_start'
- : 'list_item_start'
- });
-
- // Recurse.
- block.token(item, tokens);
-
- tokens.push({
- type: 'list_item_end'
- });
- }
-
- tokens.push({
- type: 'list_end'
- });
-
- continue;
- }
-
- // html
- if (cap = block.html.exec(src)) {
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'html',
- pre: cap[1] === 'pre',
- text: cap[0]
- });
- continue;
- }
-
- // def
- if (top && (cap = block.def.exec(src))) {
- src = src.substring(cap[0].length);
- tokens.links[cap[1].toLowerCase()] = {
- href: cap[2],
- title: cap[3]
- };
- continue;
- }
-
- // top-level paragraph
- if (top && (cap = block.paragraph.exec(src))) {
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'paragraph',
- text: cap[0]
- });
- continue;
- }
-
- // text
- if (cap = block.text.exec(src)) {
- // Top-level should never reach here.
- src = src.substring(cap[0].length);
- tokens.push({
- type: 'text',
- text: cap[0]
- });
- continue;
- }
- }
-
- return tokens;
-};
-
-/**
- * Inline Processing
- */
-
-var inline = {
- escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,
- autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,
- url: noop,
- tag: /^<!--[^\0]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
- link: /^!?\[(inside)\]\(href\)/,
- reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,
- nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,
- strong: /^__([^\0]+?)__(?!_)|^\*\*([^\0]+?)\*\*(?!\*)/,
- em: /^\b_((?:__|[^\0])+?)_\b|^\*((?:\*\*|[^\0])+?)\*(?!\*)/,
- code: /^(`+)([^\0]*?[^`])\1(?!`)/,
- br: /^ {2,}\n(?!\s*$)/,
- text: /^[^\0]+?(?=[\\<!\[_*`]| {2,}\n|$)/
-};
-
-inline._linkInside = /(?:\[[^\]]*\]|[^\]]|\](?=[^\[]*\]))*/;
-inline._linkHref = /\s*<?([^\s]*?)>?(?:\s+['"]([^\0]*?)['"])?\s*/;
-
-inline.link = replace(inline.link)
- ('inside', inline._linkInside)
- ('href', inline._linkHref)
- ();
-
-inline.reflink = replace(inline.reflink)
- ('inside', inline._linkInside)
- ();
-
-inline.normal = {
- url: inline.url,
- strong: inline.strong,
- em: inline.em,
- text: inline.text
-};
-
-inline.pedantic = {
- strong: /^__(?=\S)([^\0]*?\S)__(?!_)|^\*\*(?=\S)([^\0]*?\S)\*\*(?!\*)/,
- em: /^_(?=\S)([^\0]*?\S)_(?!_)|^\*(?=\S)([^\0]*?\S)\*(?!\*)/
-};
-
-inline.gfm = {
- url: /^(https?:\/\/[^\s]+[^.,:;"')\]\s])/,
- text: /^[^\0]+?(?=[\\<!\[_*`]|https?:\/\/| {2,}\n|$)/
-};
-
-/**
- * Inline Lexer
- */
-
-inline.lexer = function(src) {
- var out = ''
- , links = tokens.links
- , link
- , text
- , href
- , cap;
-
- while (src) {
- // escape
- if (cap = inline.escape.exec(src)) {
- src = src.substring(cap[0].length);
- out += cap[1];
- continue;
- }
-
- // autolink
- if (cap = inline.autolink.exec(src)) {
- src = src.substring(cap[0].length);
- if (cap[2] === '@') {
- text = cap[1][6] === ':'
- ? mangle(cap[1].substring(7))
- : mangle(cap[1]);
- href = mangle('mailto:') + text;
- } else {
- text = escape(cap[1]);
- href = text;
- }
- out += '<a href="'
- + href
- + '">'
- + text
- + '</a>';
- continue;
- }
-
- // url (gfm)
- if (cap = inline.url.exec(src)) {
- src = src.substring(cap[0].length);
- text = escape(cap[1]);
- href = text;
- out += '<a href="'
- + href
- + '">'
- + text
- + '</a>';
- continue;
- }
-
- // tag
- if (cap = inline.tag.exec(src)) {
- src = src.substring(cap[0].length);
- out += options.sanitize
- ? escape(cap[0])
- : cap[0];
- continue;
- }
-
- // link
- if (cap = inline.link.exec(src)) {
- src = src.substring(cap[0].length);
- out += outputLink(cap, {
- href: cap[2],
- title: cap[3]
- });
- continue;
- }
-
- // reflink, nolink
- if ((cap = inline.reflink.exec(src))
- || (cap = inline.nolink.exec(src))) {
- src = src.substring(cap[0].length);
- link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
- link = links[link.toLowerCase()];
- if (!link || !link.href) {
- out += cap[0][0];
- src = cap[0].substring(1) + src;
- continue;
- }
- out += outputLink(cap, link);
- continue;
- }
-
- // strong
- if (cap = inline.strong.exec(src)) {
- src = src.substring(cap[0].length);
- out += '<strong>'
- + inline.lexer(cap[2] || cap[1])
- + '</strong>';
- continue;
- }
-
- // em
- if (cap = inline.em.exec(src)) {
- src = src.substring(cap[0].length);
- out += '<em>'
- + inline.lexer(cap[2] || cap[1])
- + '</em>';
- continue;
- }
-
- // code
- if (cap = inline.code.exec(src)) {
- src = src.substring(cap[0].length);
- out += '<code>'
- + escape(cap[2], true)
- + '</code>';
- continue;
- }
-
- // br
- if (cap = inline.br.exec(src)) {
- src = src.substring(cap[0].length);
- out += '<br>';
- continue;
- }
-
- // text
- if (cap = inline.text.exec(src)) {
- src = src.substring(cap[0].length);
- out += escape(cap[0]);
- continue;
- }
- }
-
- return out;
-};
-
-function outputLink(cap, link) {
- if (cap[0][0] !== '!') {
- return '<a href="'
- + escape(link.href)
- + '"'
- + (link.title
- ? ' title="'
- + escape(link.title)
- + '"'
- : '')
- + '>'
- + inline.lexer(cap[1])
- + '</a>';
- } else {
- return '<img src="'
- + escape(link.href)
- + '" alt="'
- + escape(cap[1])
- + '"'
- + (link.title
- ? ' title="'
- + escape(link.title)
- + '"'
- : '')
- + '>';
- }
-}
-
-/**
- * Parsing
- */
-
-var tokens
- , token;
-
-function next() {
- return token = tokens.pop();
-}
-
-function tok() {
- switch (token.type) {
- case 'space': {
- return '';
- }
- case 'hr': {
- return '<hr>\n';
- }
- case 'heading': {
- return '<h'
- + token.depth
- + '>'
- + inline.lexer(token.text)
- + '</h'
- + token.depth
- + '>\n';
- }
- case 'code': {
- if (options.highlight) {
- token.code = options.highlight(token.text, token.lang);
- if (token.code != null && token.code !== token.text) {
- token.escaped = true;
- token.text = token.code;
- }
- }
-
- if (!token.escaped) {
- token.text = escape(token.text, true);
- }
-
- return '<pre><code'
- + (token.lang
- ? ' class="lang-'
- + token.lang
- + '"'
- : '')
- + '>'
- + token.text
- + '</code></pre>\n';
- }
- case 'blockquote_start': {
- var body = '';
-
- while (next().type !== 'blockquote_end') {
- body += tok();
- }
-
- return '<blockquote>\n'
- + body
- + '</blockquote>\n';
- }
- case 'list_start': {
- var type = token.ordered ? 'ol' : 'ul'
- , body = '';
-
- while (next().type !== 'list_end') {
- body += tok();
- }
-
- return '<'
- + type
- + '>\n'
- + body
- + '</'
- + type
- + '>\n';
- }
- case 'list_item_start': {
- var body = '';
-
- while (next().type !== 'list_item_end') {
- body += token.type === 'text'
- ? parseText()
- : tok();
- }
-
- return '<li>'
- + body
- + '</li>\n';
- }
- case 'loose_item_start': {
- var body = '';
-
- while (next().type !== 'list_item_end') {
- body += tok();
- }
-
- return '<li>'
- + body
- + '</li>\n';
- }
- case 'html': {
- if (options.sanitize) {
- return inline.lexer(token.text);
- }
- return !token.pre && !options.pedantic
- ? inline.lexer(token.text)
- : token.text;
- }
- case 'paragraph': {
- return '<p>'
- + inline.lexer(token.text)
- + '</p>\n';
- }
- case 'text': {
- return '<p>'
- + parseText()
- + '</p>\n';
- }
- }
-}
-
-function parseText() {
- var body = token.text
- , top;
-
- while ((top = tokens[tokens.length-1])
- && top.type === 'text') {
- body += '\n' + next().text;
- }
-
- return inline.lexer(body);
-}
-
-function parse(src) {
- tokens = src.reverse();
-
- var out = '';
- while (next()) {
- out += tok();
- }
-
- tokens = null;
- token = null;
-
- return out;
-}
-
-/**
- * Helpers
- */
-
-function escape(html, encode) {
- return html
- .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;')
- .replace(/"/g, '&quot;')
- .replace(/'/g, '&#39;');
-}
-
-function mangle(text) {
- var out = ''
- , l = text.length
- , i = 0
- , ch;
-
- for (; i < l; i++) {
- ch = text.charCodeAt(i);
- if (Math.random() > 0.5) {
- ch = 'x' + ch.toString(16);
- }
- out += '&#' + ch + ';';
- }
-
- return out;
-}
-
-function tag() {
- var tag = '(?!(?:'
- + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
- + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
- + '|span|br|wbr|ins|del|img)\\b)\\w+';
-
- return tag;
-}
-
-function replace(regex, opt) {
- regex = regex.source;
- opt = opt || '';
- return function self(name, val) {
- if (!name) return new RegExp(regex, opt);
- regex = regex.replace(name, val.source || val);
- return self;
- };
-}
-
-function noop() {}
-noop.exec = noop;
-
-/**
- * Marked
- */
-
-function marked(src, opt) {
- setOptions(opt);
- return parse(block.lexer(src));
-}
-
-/**
- * Options
- */
-
-var options
- , defaults;
-
-function setOptions(opt) {
- if (!opt) opt = defaults;
- if (options === opt) return;
- options = opt;
-
- if (options.gfm) {
- block.fences = block.gfm.fences;
- block.paragraph = block.gfm.paragraph;
- inline.text = inline.gfm.text;
- inline.url = inline.gfm.url;
- } else {
- block.fences = block.normal.fences;
- block.paragraph = block.normal.paragraph;
- inline.text = inline.normal.text;
- inline.url = inline.normal.url;
- }
-
- if (options.pedantic) {
- inline.em = inline.pedantic.em;
- inline.strong = inline.pedantic.strong;
- } else {
- inline.em = inline.normal.em;
- inline.strong = inline.normal.strong;
- }
-}
-
-marked.options =
-marked.setOptions = function(opt) {
- defaults = opt;
- setOptions(opt);
- return marked;
-};
-
-marked.setOptions({
- gfm: true,
- pedantic: false,
- sanitize: false,
- highlight: null
-});
-
-/**
- * Expose
- */
-
-marked.parser = function(src, opt) {
- setOptions(opt);
- return parse(src);
-};
-
-marked.lexer = function(src, opt) {
- setOptions(opt);
- return block.lexer(src);
-};
-
-marked.parse = marked;
-
-if (typeof module !== 'undefined') {
- module.exports = marked;
-} else {
- this.marked = marked;
-}
-
-}).call(function() {
- return this || (typeof window !== 'undefined' ? window : global);
-}());
diff --git a/tools/blog/node_modules/marked/man/marked.1 b/tools/blog/node_modules/marked/man/marked.1
deleted file mode 100644
index 672e336e85..0000000000
--- a/tools/blog/node_modules/marked/man/marked.1
+++ /dev/null
@@ -1,49 +0,0 @@
-.ds q \N'34'
-.TH marked 1
-.SH NAME
-marked \- a javascript markdown parser
-.SH SYNOPSIS
-.nf
-.B marked [\-o output] [\-i input] [\-th]
-.fi
-.SH DESCRIPTION
-.B marked
-is a full-featured javascript markdown parser, built for speed. It also includes
-multiple GFM features.
-.SH OPTIONS
-.TP
-.BI \-o,\ \-\-output\ [output]
-Specify file output. If none is specified, write to stdout.
-.TP
-.BI \-i,\ \-\-input\ [input]
-Specify file input, otherwise use last argument as input file. If no input file
-is specified, read from stdin.
-.TP
-.BI \-t,\ \-\-tokens
-Output a token stream instead of html.
-.TP
-.BI \-\-pedantic
-Conform to obscure parts of markdown.pl as much as possible. Don't fix original
-markdown bugs.
-.TP
-.BI \-\-gfm
-Enable github flavored markdown.
-.TP
-.BI \-\-sanitize
-Sanitize output. Ignore any HTML input.
-.TP
-.BI \-h,\ \-\-help
-Display help information.
-.SH EXAMPLES
-.TP
-cat in.md | marked > out.html
-.TP
-echo "hello *world*" | marked
-.TP
-marked -o out.html in.md
-.TP
-marked --output="hello world.html" -i in.md
-.SH BUGS
-Please report any bugs to https://github.com/chjj/marked.
-.SH LICENSE
-Copyright (c) 2011-2012, Christopher Jeffrey (MIT License)
diff --git a/tools/blog/node_modules/marked/package.json b/tools/blog/node_modules/marked/package.json
deleted file mode 100644
index 4d7f86612d..0000000000
--- a/tools/blog/node_modules/marked/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "marked",
- "description": "A full-featured markdown parser and compiler, written in javascript. Built for speed.",
- "author": {
- "name": "Christopher Jeffrey"
- },
- "version": "0.2.5",
- "main": "./lib/marked.js",
- "bin": {
- "marked": "./bin/marked"
- },
- "man": [
- "./man/marked.1"
- ],
- "preferGlobal": false,
- "repository": {
- "type": "git",
- "url": "git://github.com/chjj/marked.git"
- },
- "homepage": "https://github.com/chjj/marked",
- "bugs": {
- "url": "http://github.com/chjj/marked/issues"
- },
- "keywords": [
- "markdown",
- "markup",
- "html"
- ],
- "tags": [
- "markdown",
- "markup",
- "html"
- ],
- "readme": "# marked\n\nA full-featured markdown parser and compiler, written in javascript.\nBuilt for speed.\n\n## Benchmarks\n\nnode v0.4.x\n\n``` bash\n$ node test --bench\nmarked completed in 12071ms.\nshowdown (reuse converter) completed in 27387ms.\nshowdown (new converter) completed in 75617ms.\nmarkdown-js completed in 70069ms.\n```\n\nnode v0.6.x\n\n``` bash\n$ node test --bench\nmarked completed in 6448ms.\nmarked (gfm) completed in 7357ms.\nmarked (pedantic) completed in 6092ms.\ndiscount completed in 7314ms.\nshowdown (reuse converter) completed in 16018ms.\nshowdown (new converter) completed in 18234ms.\nmarkdown-js completed in 24270ms.\n```\n\n__Marked is now faster than Discount, which is written in C.__\n\nFor those feeling skeptical: These benchmarks run the entire markdown test suite\n1000 times. The test suite tests every feature. It doesn't cater to specific\naspects.\n\n## Install\n\n``` bash\n$ npm install marked\n```\n\n## Another Javascript Markdown Parser\n\nThe point of marked was to create a markdown compiler where it was possible to\nfrequently parse huge chunks of markdown without having to worry about\ncaching the compiled output somehow...or blocking for an unnecesarily long time.\n\nmarked is very concise and still implements all markdown features. It is also\nnow fully compatible with the client-side.\n\nmarked more or less passes the official markdown test suite in its\nentirety. This is important because a surprising number of markdown compilers\ncannot pass more than a few tests. It was very difficult to get marked as\ncompliant as it is. It could have cut corners in several areas for the sake\nof performance, but did not in order to be exactly what you expect in terms\nof a markdown rendering. In fact, this is why marked could be considered at a\ndisadvantage in the benchmarks above.\n\nAlong with implementing every markdown feature, marked also implements\n[GFM features](http://github.github.com/github-flavored-markdown/).\n\n## Options\n\nmarked has 4 different switches which change behavior.\n\n- __pedantic__: Conform to obscure parts of `markdown.pl` as much as possible.\n Don't fix any of the original markdown bugs or poor behavior.\n- __gfm__: Enable github flavored markdown (enabled by default).\n- __sanitize__: Sanitize the output. Ignore any HTML that has been input.\n- __highlight__: A callback to highlight code blocks.\n\nNone of the above are mutually exclusive/inclusive.\n\n## Usage\n\n``` js\n// Set default options\nmarked.setOptions({\n gfm: true,\n pedantic: false,\n sanitize: true,\n // callback for code highlighter\n highlight: function(code, lang) {\n if (lang === 'js') {\n return javascriptHighlighter(code);\n }\n return code;\n }\n});\nconsole.log(marked('i am using __markdown__.'));\n```\n\nYou also have direct access to the lexer and parser if you so desire.\n\n``` js\nvar tokens = marked.lexer(text);\nconsole.log(marked.parser(tokens));\n```\n\n``` bash\n$ node\n> require('marked').lexer('> i am using marked.')\n[ { type: 'blockquote_start' },\n { type: 'paragraph',\n text: 'i am using marked.' },\n { type: 'blockquote_end' },\n links: {} ]\n```\n\n## CLI\n\n``` bash\n$ marked -o hello.html\nhello world\n^D\n$ cat hello.html\n<p>hello world</p>\n```\n\n## License\n\nCopyright (c) 2011-2012, Christopher Jeffrey. (MIT License)\n\nSee LICENSE for more info.\n",
- "_id": "marked@0.2.5",
- "dist": {
- "shasum": "611829a0ca7735d5728dfa02147f2e61f0776500"
- },
- "_from": "marked"
-}
diff --git a/tools/blog/node_modules/mkdirp/.npmignore b/tools/blog/node_modules/mkdirp/.npmignore
deleted file mode 100644
index 9303c347ee..0000000000
--- a/tools/blog/node_modules/mkdirp/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/
-npm-debug.log \ No newline at end of file
diff --git a/tools/blog/node_modules/mkdirp/.travis.yml b/tools/blog/node_modules/mkdirp/.travis.yml
deleted file mode 100644
index f1d0f13c8a..0000000000
--- a/tools/blog/node_modules/mkdirp/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.4
- - 0.6
diff --git a/tools/blog/node_modules/mkdirp/LICENSE b/tools/blog/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 432d1aeb01..0000000000
--- a/tools/blog/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright 2010 James Halliday (mail@substack.net)
-
-This project is free software released under the MIT/X11 license:
-
-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.
diff --git a/tools/blog/node_modules/mkdirp/README.markdown b/tools/blog/node_modules/mkdirp/README.markdown
deleted file mode 100644
index 40de04f71e..0000000000
--- a/tools/blog/node_modules/mkdirp/README.markdown
+++ /dev/null
@@ -1,61 +0,0 @@
-mkdirp
-======
-
-Like `mkdir -p`, but in node.js!
-
-[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
-
-example
-=======
-
-pow.js
-------
- var mkdirp = require('mkdirp');
-
- mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
- });
-
-Output
- pow!
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-methods
-=======
-
-var mkdirp = require('mkdirp');
-
-mkdirp(dir, mode, cb)
----------------------
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `mode`.
-
-If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-`cb(err, made)` fires with the error or the first directory `made`
-that had to be created, if any.
-
-mkdirp.sync(dir, mode)
-----------------------
-
-Synchronously create a new directory and any necessary subdirectories at `dir`
-with octal permission string `mode`.
-
-If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
-
-Returns the first directory that had to be created, if any.
-
-install
-=======
-
-With [npm](http://npmjs.org) do:
-
- npm install mkdirp
-
-license
-=======
-
-MIT/X11
diff --git a/tools/blog/node_modules/mkdirp/examples/pow.js b/tools/blog/node_modules/mkdirp/examples/pow.js
deleted file mode 100644
index e6924212e6..0000000000
--- a/tools/blog/node_modules/mkdirp/examples/pow.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var mkdirp = require('mkdirp');
-
-mkdirp('/tmp/foo/bar/baz', function (err) {
- if (err) console.error(err)
- else console.log('pow!')
-});
diff --git a/tools/blog/node_modules/mkdirp/index.js b/tools/blog/node_modules/mkdirp/index.js
deleted file mode 100644
index 874b31095a..0000000000
--- a/tools/blog/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,94 +0,0 @@
-var path = require('path');
-var fs = require('fs');
-
-module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
-
-function mkdirP (p, mode, f, made) {
- if (typeof mode === 'function' || mode === undefined) {
- f = mode;
- mode = 0777 & (~process.umask());
- }
- if (!made) made = null;
-
- var cb = f || function () {};
- if (typeof mode === 'string') mode = parseInt(mode, 8);
- p = path.resolve(p);
-
- fs.mkdir(p, mode, function (er) {
- if (!er) {
- made = made || p;
- return cb(null, made);
- }
- switch (er.code) {
- case 'ENOENT':
- mkdirP(path.dirname(p), mode, function (er, made) {
- if (er) cb(er, made);
- else mkdirP(p, mode, cb, made);
- });
- break;
-
- case 'EISDIR':
- case 'EPERM':
- // Operation not permitted or already is a dir.
- // This is the error you get when trying to mkdir('c:/')
- // on windows, or mkdir('/') on unix. Make sure it's a
- // dir by falling through to the EEXIST case.
- case 'EROFS':
- // a read-only file system.
- // However, the dir could already exist, in which case
- // the EROFS error will be obscuring a EEXIST!
- // Fallthrough to that case.
- case 'EEXIST':
- fs.stat(p, function (er2, stat) {
- // if the stat fails, then that's super weird.
- // let the original error be the failure reason.
- if (er2 || !stat.isDirectory()) cb(er, made)
- else cb(null, made);
- });
- break;
-
- default:
- cb(er, made);
- break;
- }
- });
-}
-
-mkdirP.sync = function sync (p, mode, made) {
- if (mode === undefined) {
- mode = 0777 & (~process.umask());
- }
- if (!made) made = null;
-
- if (typeof mode === 'string') mode = parseInt(mode, 8);
- p = path.resolve(p);
-
- try {
- fs.mkdirSync(p, mode);
- made = made || p;
- }
- catch (err0) {
- switch (err0.code) {
- case 'ENOENT' :
- made = sync(path.dirname(p), mode, made);
- sync(p, mode, made);
- break;
-
- case 'EEXIST' :
- var stat;
- try {
- stat = fs.statSync(p);
- }
- catch (err1) {
- throw err0;
- }
- if (!stat.isDirectory()) throw err0;
- break;
- default :
- throw err0
- break;
- }
- }
-
- return made;
-};
diff --git a/tools/blog/node_modules/mkdirp/package.json b/tools/blog/node_modules/mkdirp/package.json
deleted file mode 100644
index a77beded1c..0000000000
--- a/tools/blog/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "mkdirp",
- "description": "mkdirp ======",
- "version": "0.3.3",
- "author": {
- "name": "James Halliday",
- "email": "mail@substack.net",
- "url": "http://substack.net"
- },
- "main": "./index",
- "keywords": [
- "mkdir",
- "directory"
- ],
- "repository": {
- "type": "git",
- "url": "http://github.com/substack/node-mkdirp.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "devDependencies": {
- "tap": "~0.2.4"
- },
- "license": "MIT/X11",
- "engines": {
- "node": "*"
- },
- "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n",
- "_id": "mkdirp@0.3.3",
- "_from": "mkdirp"
-}
diff --git a/tools/blog/node_modules/mkdirp/test/chmod.js b/tools/blog/node_modules/mkdirp/test/chmod.js
deleted file mode 100644
index 520dcb8e9b..0000000000
--- a/tools/blog/node_modules/mkdirp/test/chmod.js
+++ /dev/null
@@ -1,38 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-test('chmod-pre', function (t) {
- var mode = 0744
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
- t.end();
- });
- });
-});
-
-test('chmod', function (t) {
- var mode = 0755
- mkdirp(file, mode, function (er) {
- t.ifError(er, 'should not error');
- fs.stat(file, function (er, stat) {
- t.ifError(er, 'should exist');
- t.ok(stat && stat.isDirectory(), 'should be directory');
- t.end();
- });
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/clobber.js b/tools/blog/node_modules/mkdirp/test/clobber.js
deleted file mode 100644
index 0eb7099870..0000000000
--- a/tools/blog/node_modules/mkdirp/test/clobber.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-var ps = [ '', 'tmp' ];
-
-for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
-}
-
-var file = ps.join('/');
-
-// a file in the way
-var itw = ps.slice(0, 3).join('/');
-
-
-test('clobber-pre', function (t) {
- console.error("about to write to "+itw)
- fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
-
- fs.stat(itw, function (er, stat) {
- t.ifError(er)
- t.ok(stat && stat.isFile(), 'should be file')
- t.end()
- })
-})
-
-test('clobber', function (t) {
- t.plan(2);
- mkdirp(file, 0755, function (err) {
- t.ok(err);
- t.equal(err.code, 'ENOTDIR');
- t.end();
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/mkdirp.js b/tools/blog/node_modules/mkdirp/test/mkdirp.js
deleted file mode 100644
index b07cd70c10..0000000000
--- a/tools/blog/node_modules/mkdirp/test/mkdirp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('woo', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, 0755, function (err) {
- if (err) t.fail(err);
- else path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, 0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- })
- })
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/perm.js b/tools/blog/node_modules/mkdirp/test/perm.js
deleted file mode 100644
index 23a7abbd23..0000000000
--- a/tools/blog/node_modules/mkdirp/test/perm.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('async perm', function (t) {
- t.plan(2);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
-
- mkdirp(file, 0755, function (err) {
- if (err) t.fail(err);
- else path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, 0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- })
- })
- });
-});
-
-test('async root perm', function (t) {
- mkdirp('/tmp', 0755, function (err) {
- if (err) t.fail(err);
- t.end();
- });
- t.end();
-});
diff --git a/tools/blog/node_modules/mkdirp/test/perm_sync.js b/tools/blog/node_modules/mkdirp/test/perm_sync.js
deleted file mode 100644
index f685f60906..0000000000
--- a/tools/blog/node_modules/mkdirp/test/perm_sync.js
+++ /dev/null
@@ -1,39 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('sync perm', function (t) {
- t.plan(2);
- var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
-
- mkdirp.sync(file, 0755);
- path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, 0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- })
- });
-});
-
-test('sync root perm', function (t) {
- t.plan(1);
-
- var file = '/tmp';
- mkdirp.sync(file, 0755);
- path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- })
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/race.js b/tools/blog/node_modules/mkdirp/test/race.js
deleted file mode 100644
index 96a0447636..0000000000
--- a/tools/blog/node_modules/mkdirp/test/race.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var mkdirp = require('../').mkdirp;
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('race', function (t) {
- t.plan(4);
- var ps = [ '', 'tmp' ];
-
- for (var i = 0; i < 25; i++) {
- var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- ps.push(dir);
- }
- var file = ps.join('/');
-
- var res = 2;
- mk(file, function () {
- if (--res === 0) t.end();
- });
-
- mk(file, function () {
- if (--res === 0) t.end();
- });
-
- function mk (file, cb) {
- mkdirp(file, 0755, function (err) {
- if (err) t.fail(err);
- else path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, 0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- if (cb) cb();
- }
- })
- })
- });
- }
-});
diff --git a/tools/blog/node_modules/mkdirp/test/rel.js b/tools/blog/node_modules/mkdirp/test/rel.js
deleted file mode 100644
index 79858243ab..0000000000
--- a/tools/blog/node_modules/mkdirp/test/rel.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('rel', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var cwd = process.cwd();
- process.chdir('/tmp');
-
- var file = [x,y,z].join('/');
-
- mkdirp(file, 0755, function (err) {
- if (err) t.fail(err);
- else path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- process.chdir(cwd);
- t.equal(stat.mode & 0777, 0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- })
- })
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/return.js b/tools/blog/node_modules/mkdirp/test/return.js
deleted file mode 100644
index bce68e5613..0000000000
--- a/tools/blog/node_modules/mkdirp/test/return.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(4);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, '/tmp/' + x);
- mkdirp(file, function (err, made) {
- t.ifError(err);
- t.equal(made, null);
- });
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/return_sync.js b/tools/blog/node_modules/mkdirp/test/return_sync.js
deleted file mode 100644
index 7c222d3558..0000000000
--- a/tools/blog/node_modules/mkdirp/test/return_sync.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('return value', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- // should return the first dir created.
- // By this point, it would be profoundly surprising if /tmp didn't
- // already exist, since every other test makes things in there.
- // Note that this will throw on failure, which will fail the test.
- var made = mkdirp.sync(file);
- t.equal(made, '/tmp/' + x);
-
- // making the same file again should have no effect.
- made = mkdirp.sync(file);
- t.equal(made, null);
-});
diff --git a/tools/blog/node_modules/mkdirp/test/root.js b/tools/blog/node_modules/mkdirp/test/root.js
deleted file mode 100644
index 97ad7a2f35..0000000000
--- a/tools/blog/node_modules/mkdirp/test/root.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('root', function (t) {
- // '/' on unix, 'c:/' on windows.
- var file = path.resolve('/');
-
- mkdirp(file, 0755, function (err) {
- if (err) throw err
- fs.stat(file, function (er, stat) {
- if (er) throw er
- t.ok(stat.isDirectory(), 'target is a directory');
- t.end();
- })
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/sync.js b/tools/blog/node_modules/mkdirp/test/sync.js
deleted file mode 100644
index 7530cada84..0000000000
--- a/tools/blog/node_modules/mkdirp/test/sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('sync', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file, 0755);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, 0755);
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- });
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/umask.js b/tools/blog/node_modules/mkdirp/test/umask.js
deleted file mode 100644
index 64ccafe22b..0000000000
--- a/tools/blog/node_modules/mkdirp/test/umask.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('implicit mode from umask', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- mkdirp(file, function (err) {
- if (err) t.fail(err);
- else path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, 0777 & (~process.umask()));
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- })
- })
- });
-});
diff --git a/tools/blog/node_modules/mkdirp/test/umask_sync.js b/tools/blog/node_modules/mkdirp/test/umask_sync.js
deleted file mode 100644
index 35bd5cbbf4..0000000000
--- a/tools/blog/node_modules/mkdirp/test/umask_sync.js
+++ /dev/null
@@ -1,32 +0,0 @@
-var mkdirp = require('../');
-var path = require('path');
-var fs = require('fs');
-var test = require('tap').test;
-
-test('umask sync modes', function (t) {
- t.plan(2);
- var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
- var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
-
- var file = '/tmp/' + [x,y,z].join('/');
-
- try {
- mkdirp.sync(file);
- } catch (err) {
- t.fail(err);
- return t.end();
- }
-
- path.exists(file, function (ex) {
- if (!ex) t.fail('file not created')
- else fs.stat(file, function (err, stat) {
- if (err) t.fail(err)
- else {
- t.equal(stat.mode & 0777, (0777 & (~process.umask())));
- t.ok(stat.isDirectory(), 'target not a directory');
- t.end();
- }
- });
- });
-});
diff --git a/tools/blog/node_modules/semver/LICENSE b/tools/blog/node_modules/semver/LICENSE
deleted file mode 100644
index 05a4010949..0000000000
--- a/tools/blog/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
-All rights reserved.
-
-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.
diff --git a/tools/blog/node_modules/semver/README.md b/tools/blog/node_modules/semver/README.md
deleted file mode 100644
index 6fa37a3d89..0000000000
--- a/tools/blog/node_modules/semver/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
-
- semver.valid('1.2.3') // true
- semver.valid('a.b.c') // false
- semver.clean(' =v1.2.3 ') // '1.2.3'
- semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
- semver.gt('1.2.3', '9.8.7') // false
- semver.lt('1.2.3', '9.8.7') // true
-
-As a command-line utility:
-
- $ semver -h
-
- Usage: semver -v <version> [-r <range>]
- Test if version(s) satisfy the supplied range(s),
- and sort them.
-
- Multiple versions or ranges may be supplied.
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no versions are valid, or ranges are not satisfied,
- then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A version is the following things, in this order:
-
-* a number (Major)
-* a period
-* a number (minor)
-* a period
-* a number (patch)
-* OPTIONAL: a hyphen, followed by a number (build)
-* OPTIONAL: a collection of pretty much any non-whitespace characters
- (tag)
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Comparisons
-
-The ordering of versions is done using the following algorithm, given
-two versions and asked to find the greater of the two:
-
-* If the majors are numerically different, then take the one
- with a bigger major number. `2.3.4 > 1.3.4`
-* If the minors are numerically different, then take the one
- with the bigger minor number. `2.3.4 > 2.2.4`
-* If the patches are numerically different, then take the one with the
- bigger patch number. `2.3.4 > 2.3.3`
-* If only one of them has a build number, then take the one with the
- build number. `2.3.4-0 > 2.3.4`
-* If they both have build numbers, and the build numbers are numerically
- different, then take the one with the bigger build number.
- `2.3.4-10 > 2.3.4-9`
-* If only one of them has a tag, then take the one without the tag.
- `2.3.4 > 2.3.4-beta`
-* If they both have tags, then take the one with the lexicographically
- larger tag. `2.3.4-beta > 2.3.4-alpha`
-* At this point, they're equal.
-
-## Ranges
-
-The following range styles are supported:
-
-* `>1.2.3` Greater than a specific version.
-* `<1.2.3` Less than
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-* `~1.2.3` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <2.0.0`
-* `~1` := `>=1.0.0 <2.0.0`
-* `1.2.x` := `>=1.2.0 <1.3.0`
-* `1.x` := `>=1.0.0 <2.0.0`
-
-Ranges can be joined with either a space (which implies "and") or a
-`||` (which implies "or").
-
-## Functions
-
-* valid(v): Return the parsed version, or null if it's not valid.
-* inc(v, release): Return the version incremented by the release type
- (major, minor, patch, or build), or null if it's not valid.
-
-### Comparison
-
-* gt(v1, v2): `v1 > v2`
-* gte(v1, v2): `v1 >= v2`
-* lt(v1, v2): `v1 < v2`
-* lte(v1, v2): `v1 <= v2`
-* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* neq(v1, v2): `v1 != v2` The opposite of eq.
-* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if
- v2 is greater. Sorts in ascending order if passed to Array.sort().
-* rcompare(v1, v2): The reverse of compare. Sorts an array of versions
- in descending order when passed to Array.sort().
-
-
-### Ranges
-
-* validRange(range): Return the valid range or null if it's not valid
-* satisfies(version, range): Return true if the version satisfies the
- range.
-* maxSatisfying(versions, range): Return the highest version in the list
- that satisfies the range, or null if none of them do.
diff --git a/tools/blog/node_modules/semver/bin/semver b/tools/blog/node_modules/semver/bin/semver
deleted file mode 100755
index 3e6afb40d8..0000000000
--- a/tools/blog/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , semver = require("../semver")
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a
- switch (a = argv.shift()) {
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(semver.valid)
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i])
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- versions.sort(semver.compare)
- .map(semver.clean)
- .forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["Usage: semver -v <version> [-r <range>]"
- ,"Test if version(s) satisfy the supplied range(s),"
- ,"and sort them."
- ,""
- ,"Multiple versions or ranges may be supplied."
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no versions are valid, or ranges are not satisfied,"
- ,"then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
-
-
diff --git a/tools/blog/node_modules/semver/package.json b/tools/blog/node_modules/semver/package.json
deleted file mode 100644
index 6d8940060c..0000000000
--- a/tools/blog/node_modules/semver/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "semver",
- "version": "1.0.14",
- "description": "The semantic version parser used by npm.",
- "main": "semver.js",
- "scripts": {
- "test": "tap test.js"
- },
- "devDependencies": {
- "tap": "0.x >=0.0.4"
- },
- "license": {
- "type": "MIT",
- "url": "https://github.com/isaacs/semver/raw/master/LICENSE"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-semver.git"
- },
- "bin": {
- "semver": "./bin/semver"
- },
- "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // true\n semver.valid('a.b.c') // false\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v <version> [-r <range>]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <2.0.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n",
- "_id": "semver@1.0.14",
- "_from": "semver"
-}
diff --git a/tools/blog/node_modules/semver/semver.js b/tools/blog/node_modules/semver/semver.js
deleted file mode 100644
index 8090e0c0dd..0000000000
--- a/tools/blog/node_modules/semver/semver.js
+++ /dev/null
@@ -1,305 +0,0 @@
-;(function (exports) { // nothing in here is node-specific.
-
-// See http://semver.org/
-// This implementation is a *hair* less strict in that it allows
-// v1.2.3 things, and also tags that don't begin with a char.
-
-var semver = "\\s*[v=]*\\s*([0-9]+)" // major
- + "\\.([0-9]+)" // minor
- + "\\.([0-9]+)" // patch
- + "(-[0-9]+-?)?" // build
- + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?" // tag
- , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$"
- , xRangePlain = "[v=]*([0-9]+|x|X|\\*)"
- + "(?:\\.([0-9]+|x|X|\\*)"
- + "(?:\\.([0-9]+|x|X|\\*)"
- + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?"
- , xRange = "((?:<|>)=?)?\\s*" + xRangePlain
- , exprSpermy = "(?:~>?)"+xRange
- , expressions = exports.expressions =
- { parse : new RegExp("^\\s*"+semver+"\\s*$")
- , parsePackage : new RegExp("^\\s*([^\/]+)[-@](" +semver+")\\s*$")
- , parseRange : new RegExp(
- "^\\s*(" + semver + ")\\s+-\\s+(" + semver + ")\\s*$")
- , validComparator : new RegExp("^"+exprComparator+"$")
- , parseXRange : new RegExp("^"+xRange+"$")
- , parseSpermy : new RegExp("^"+exprSpermy+"$")
- }
-
-
-Object.getOwnPropertyNames(expressions).forEach(function (i) {
- exports[i] = function (str) {
- return ("" + (str || "")).match(expressions[i])
- }
-})
-
-exports.rangeReplace = ">=$1 <=$7"
-exports.clean = clean
-exports.compare = compare
-exports.rcompare = rcompare
-exports.satisfies = satisfies
-exports.gt = gt
-exports.gte = gte
-exports.lt = lt
-exports.lte = lte
-exports.eq = eq
-exports.neq = neq
-exports.cmp = cmp
-exports.inc = inc
-
-exports.valid = valid
-exports.validPackage = validPackage
-exports.validRange = validRange
-exports.maxSatisfying = maxSatisfying
-
-exports.replaceStars = replaceStars
-exports.toComparators = toComparators
-
-function stringify (version) {
- var v = version
- return [v[1]||'', v[2]||'', v[3]||''].join(".") + (v[4]||'') + (v[5]||'')
-}
-
-function clean (version) {
- version = exports.parse(version)
- if (!version) return version
- return stringify(version)
-}
-
-function valid (version) {
- if (typeof version !== "string") return null
- return exports.parse(version) && version.trim().replace(/^[v=]+/, '')
-}
-
-function validPackage (version) {
- if (typeof version !== "string") return null
- return version.match(expressions.parsePackage) && version.trim()
-}
-
-// range can be one of:
-// "1.0.3 - 2.0.0" range, inclusive, like ">=1.0.3 <=2.0.0"
-// ">1.0.2" like 1.0.3 - 9999.9999.9999
-// ">=1.0.2" like 1.0.2 - 9999.9999.9999
-// "<2.0.0" like 0.0.0 - 1.9999.9999
-// ">1.0.2 <2.0.0" like 1.0.3 - 1.9999.9999
-var starExpression = /(<|>)?=?\s*\*/g
- , starReplace = ""
- , compTrimExpression = new RegExp("((<|>)?=?)\\s*("
- +semver+"|"+xRangePlain+")", "g")
- , compTrimReplace = "$1$3"
-
-function toComparators (range) {
- var ret = (range || "").trim()
- .replace(expressions.parseRange, exports.rangeReplace)
- .replace(compTrimExpression, compTrimReplace)
- .split(/\s+/)
- .join(" ")
- .split("||")
- .map(function (orchunk) {
- return orchunk
- .split(" ")
- .map(replaceXRanges)
- .map(replaceSpermies)
- .map(replaceStars)
- .join(" ").trim()
- })
- .map(function (orchunk) {
- return orchunk
- .trim()
- .split(/\s+/)
- .filter(function (c) { return c.match(expressions.validComparator) })
- })
- .filter(function (c) { return c.length })
- return ret
-}
-
-function replaceStars (stars) {
- return stars.trim().replace(starExpression, starReplace)
-}
-
-// "2.x","2.x.x" --> ">=2.0.0- <2.1.0-"
-// "2.3.x" --> ">=2.3.0- <2.4.0-"
-function replaceXRanges (ranges) {
- return ranges.split(/\s+/)
- .map(replaceXRange)
- .join(" ")
-}
-
-function replaceXRange (version) {
- return version.trim().replace(expressions.parseXRange,
- function (v, gtlt, M, m, p, t) {
- var anyX = !M || M.toLowerCase() === "x" || M === "*"
- || !m || m.toLowerCase() === "x" || m === "*"
- || !p || p.toLowerCase() === "x" || p === "*"
- , ret = v
-
- if (gtlt && anyX) {
- // just replace x'es with zeroes
- ;(!M || M === "*" || M.toLowerCase() === "x") && (M = 0)
- ;(!m || m === "*" || m.toLowerCase() === "x") && (m = 0)
- ;(!p || p === "*" || p.toLowerCase() === "x") && (p = 0)
- ret = gtlt + M+"."+m+"."+p+"-"
- } else if (!M || M === "*" || M.toLowerCase() === "x") {
- ret = "*" // allow any
- } else if (!m || m === "*" || m.toLowerCase() === "x") {
- // append "-" onto the version, otherwise
- // "1.x.x" matches "2.0.0beta", since the tag
- // *lowers* the version value
- ret = ">="+M+".0.0- <"+(+M+1)+".0.0-"
- } else if (!p || p === "*" || p.toLowerCase() === "x") {
- ret = ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
- }
- //console.error("parseXRange", [].slice.call(arguments), ret)
- return ret
- })
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceSpermies (version) {
- return version.trim().replace(expressions.parseSpermy,
- function (v, gtlt, M, m, p, t) {
- if (gtlt) throw new Error(
- "Using '"+gtlt+"' with ~ makes no sense. Don't do it.")
-
- if (!M || M.toLowerCase() === "x") {
- return ""
- }
- // ~1 == >=1.0.0- <2.0.0-
- if (!m || m.toLowerCase() === "x") {
- return ">="+M+".0.0- <"+(+M+1)+".0.0-"
- }
- // ~1.2 == >=1.2.0- <1.3.0-
- if (!p || p.toLowerCase() === "x") {
- return ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-"
- }
- // ~1.2.3 == >=1.2.3- <1.3.0-
- t = t || "-"
- return ">="+M+"."+m+"."+p+t+" <"+M+"."+(+m+1)+".0-"
- })
-}
-
-function validRange (range) {
- range = replaceStars(range)
- var c = toComparators(range)
- return (c.length === 0)
- ? null
- : c.map(function (c) { return c.join(" ") }).join("||")
-}
-
-// returns the highest satisfying version in the list, or undefined
-function maxSatisfying (versions, range) {
- return versions
- .filter(function (v) { return satisfies(v, range) })
- .sort(compare)
- .pop()
-}
-function satisfies (version, range) {
- version = valid(version)
- if (!version) return false
- range = toComparators(range)
- for (var i = 0, l = range.length ; i < l ; i ++) {
- var ok = false
- for (var j = 0, ll = range[i].length ; j < ll ; j ++) {
- var r = range[i][j]
- , gtlt = r.charAt(0) === ">" ? gt
- : r.charAt(0) === "<" ? lt
- : false
- , eq = r.charAt(!!gtlt) === "="
- , sub = (!!eq) + (!!gtlt)
- if (!gtlt) eq = true
- r = r.substr(sub)
- r = (r === "") ? r : valid(r)
- ok = (r === "") || (eq && r === version) || (gtlt && gtlt(version, r))
- if (!ok) break
- }
- if (ok) return true
- }
- return false
-}
-
-// return v1 > v2 ? 1 : -1
-function compare (v1, v2) {
- var g = gt(v1, v2)
- return g === null ? 0 : g ? 1 : -1
-}
-
-function rcompare (v1, v2) {
- return compare(v2, v1)
-}
-
-function lt (v1, v2) { return gt(v2, v1) }
-function gte (v1, v2) { return !lt(v1, v2) }
-function lte (v1, v2) { return !gt(v1, v2) }
-function eq (v1, v2) { return gt(v1, v2) === null }
-function neq (v1, v2) { return gt(v1, v2) !== null }
-function cmp (v1, c, v2) {
- switch (c) {
- case ">": return gt(v1, v2)
- case "<": return lt(v1, v2)
- case ">=": return gte(v1, v2)
- case "<=": return lte(v1, v2)
- case "==": return eq(v1, v2)
- case "!=": return neq(v1, v2)
- case "===": return v1 === v2
- case "!==": return v1 !== v2
- default: throw new Error("Y U NO USE VALID COMPARATOR!? "+c)
- }
-}
-
-// return v1 > v2
-function num (v) {
- return v === undefined ? -1 : parseInt((v||"0").replace(/[^0-9]+/g, ''), 10)
-}
-function gt (v1, v2) {
- v1 = exports.parse(v1)
- v2 = exports.parse(v2)
- if (!v1 || !v2) return false
-
- for (var i = 1; i < 5; i ++) {
- v1[i] = num(v1[i])
- v2[i] = num(v2[i])
- if (v1[i] > v2[i]) return true
- else if (v1[i] !== v2[i]) return false
- }
- // no tag is > than any tag, or use lexicographical order.
- var tag1 = v1[5] || ""
- , tag2 = v2[5] || ""
-
- // kludge: null means they were equal. falsey, and detectable.
- // embarrassingly overclever, though, I know.
- return tag1 === tag2 ? null
- : !tag1 ? true
- : !tag2 ? false
- : tag1 > tag2
-}
-
-function inc (version, release) {
- version = exports.parse(version)
- if (!version) return null
-
- var parsedIndexLookup =
- { 'major': 1
- , 'minor': 2
- , 'patch': 3
- , 'build': 4 }
- var incIndex = parsedIndexLookup[release]
- if (incIndex === undefined) return null
-
- var current = num(version[incIndex])
- version[incIndex] = current === -1 ? 1 : current + 1
-
- for (var i = incIndex + 1; i < 5; i ++) {
- if (num(version[i]) !== -1) version[i] = "0"
- }
-
- if (version[4]) version[4] = "-" + version[4]
- version[5] = ""
-
- return stringify(version)
-}
-})(typeof exports === "object" ? exports : semver = {})
diff --git a/tools/blog/node_modules/semver/test.js b/tools/blog/node_modules/semver/test.js
deleted file mode 100644
index 65ff8a9634..0000000000
--- a/tools/blog/node_modules/semver/test.js
+++ /dev/null
@@ -1,405 +0,0 @@
-var tap = require("tap")
- , test = tap.test
- , semver = require("./semver.js")
- , eq = semver.eq
- , gt = semver.gt
- , lt = semver.lt
- , neq = semver.neq
- , cmp = semver.cmp
- , gte = semver.gte
- , lte = semver.lte
- , satisfies = semver.satisfies
- , validRange = semver.validRange
- , inc = semver.inc
- , replaceStars = semver.replaceStars
- , toComparators = semver.toComparators
-
-tap.plan(8)
-
-test("\ncomparison tests", function (t) {
-; [ ["0.0.0", "0.0.0foo"]
- , ["0.0.1", "0.0.0"]
- , ["1.0.0", "0.9.9"]
- , ["0.10.0", "0.9.0"]
- , ["0.99.0", "0.10.0"]
- , ["2.0.0", "1.2.3"]
- , ["v0.0.0", "0.0.0foo"]
- , ["v0.0.1", "0.0.0"]
- , ["v1.0.0", "0.9.9"]
- , ["v0.10.0", "0.9.0"]
- , ["v0.99.0", "0.10.0"]
- , ["v2.0.0", "1.2.3"]
- , ["0.0.0", "v0.0.0foo"]
- , ["0.0.1", "v0.0.0"]
- , ["1.0.0", "v0.9.9"]
- , ["0.10.0", "v0.9.0"]
- , ["0.99.0", "v0.10.0"]
- , ["2.0.0", "v1.2.3"]
- , ["1.2.3", "1.2.3-asdf"]
- , ["1.2.3-4", "1.2.3"]
- , ["1.2.3-4-foo", "1.2.3"]
- , ["1.2.3-5", "1.2.3-5-foo"]
- , ["1.2.3-5", "1.2.3-4"]
- , ["1.2.3-5-foo", "1.2.3-5-Foo"]
- ].forEach(function (v) {
- var v0 = v[0]
- , v1 = v[1]
- t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')")
- t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')")
- t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')")
- t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
- t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')")
- t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')")
- t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')")
- t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')")
- t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')")
- t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')")
- t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')")
- })
- t.end()
-})
-
-test("\nequality tests", function (t) {
-; [ ["1.2.3", "v1.2.3"]
- , ["1.2.3", "=1.2.3"]
- , ["1.2.3", "v 1.2.3"]
- , ["1.2.3", "= 1.2.3"]
- , ["1.2.3", " v1.2.3"]
- , ["1.2.3", " =1.2.3"]
- , ["1.2.3", " v 1.2.3"]
- , ["1.2.3", " = 1.2.3"]
- , ["1.2.3-0", "v1.2.3-0"]
- , ["1.2.3-0", "=1.2.3-0"]
- , ["1.2.3-0", "v 1.2.3-0"]
- , ["1.2.3-0", "= 1.2.3-0"]
- , ["1.2.3-0", " v1.2.3-0"]
- , ["1.2.3-0", " =1.2.3-0"]
- , ["1.2.3-0", " v 1.2.3-0"]
- , ["1.2.3-0", " = 1.2.3-0"]
- , ["1.2.3-01", "v1.2.3-1"]
- , ["1.2.3-01", "=1.2.3-1"]
- , ["1.2.3-01", "v 1.2.3-1"]
- , ["1.2.3-01", "= 1.2.3-1"]
- , ["1.2.3-01", " v1.2.3-1"]
- , ["1.2.3-01", " =1.2.3-1"]
- , ["1.2.3-01", " v 1.2.3-1"]
- , ["1.2.3-01", " = 1.2.3-1"]
- , ["1.2.3beta", "v1.2.3beta"]
- , ["1.2.3beta", "=1.2.3beta"]
- , ["1.2.3beta", "v 1.2.3beta"]
- , ["1.2.3beta", "= 1.2.3beta"]
- , ["1.2.3beta", " v1.2.3beta"]
- , ["1.2.3beta", " =1.2.3beta"]
- , ["1.2.3beta", " v 1.2.3beta"]
- , ["1.2.3beta", " = 1.2.3beta"]
- ].forEach(function (v) {
- var v0 = v[0]
- , v1 = v[1]
- t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')")
- t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')")
- t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")")
- t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")")
- t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")")
- t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")")
- t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')")
- t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')")
- t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')")
- t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')")
- })
- t.end()
-})
-
-
-test("\nrange tests", function (t) {
-; [ ["1.0.0 - 2.0.0", "1.2.3"]
- , ["1.0.0", "1.0.0"]
- , [">=*", "0.2.4"]
- , ["", "1.0.0"]
- , ["*", "1.2.3"]
- , ["*", "v1.2.3-foo"]
- , [">=1.0.0", "1.0.0"]
- , [">=1.0.0", "1.0.1"]
- , [">=1.0.0", "1.1.0"]
- , [">1.0.0", "1.0.1"]
- , [">1.0.0", "1.1.0"]
- , ["<=2.0.0", "2.0.0"]
- , ["<=2.0.0", "1.9999.9999"]
- , ["<=2.0.0", "0.2.9"]
- , ["<2.0.0", "1.9999.9999"]
- , ["<2.0.0", "0.2.9"]
- , [">= 1.0.0", "1.0.0"]
- , [">= 1.0.0", "1.0.1"]
- , [">= 1.0.0", "1.1.0"]
- , ["> 1.0.0", "1.0.1"]
- , ["> 1.0.0", "1.1.0"]
- , ["<= 2.0.0", "2.0.0"]
- , ["<= 2.0.0", "1.9999.9999"]
- , ["<= 2.0.0", "0.2.9"]
- , ["< 2.0.0", "1.9999.9999"]
- , ["<\t2.0.0", "0.2.9"]
- , [">=0.1.97", "v0.1.97"]
- , [">=0.1.97", "0.1.97"]
- , ["0.1.20 || 1.2.4", "1.2.4"]
- , [">=0.2.3 || <0.0.1", "0.0.0"]
- , [">=0.2.3 || <0.0.1", "0.2.3"]
- , [">=0.2.3 || <0.0.1", "0.2.4"]
- , ["||", "1.3.4"]
- , ["2.x.x", "2.1.3"]
- , ["1.2.x", "1.2.3"]
- , ["1.2.x || 2.x", "2.1.3"]
- , ["1.2.x || 2.x", "1.2.3"]
- , ["x", "1.2.3"]
- , ["2.*.*", "2.1.3"]
- , ["1.2.*", "1.2.3"]
- , ["1.2.* || 2.*", "2.1.3"]
- , ["1.2.* || 2.*", "1.2.3"]
- , ["*", "1.2.3"]
- , ["2", "2.1.2"]
- , ["2.3", "2.3.1"]
- , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0
- , ["~2.4", "2.4.5"]
- , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0
- , ["~1", "1.2.3"] // >=1.0.0 <2.0.0
- , ["~>1", "1.2.3"]
- , ["~> 1", "1.2.3"]
- , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0
- , ["~ 1.0", "1.0.2"]
- , [">=1", "1.0.0"]
- , [">= 1", "1.0.0"]
- , ["<1.2", "1.1.1"]
- , ["< 1.2", "1.1.1"]
- , ["1", "1.0.0beta"]
- , ["~v0.5.4-pre", "0.5.5"]
- , ["~v0.5.4-pre", "0.5.4"]
- , ["=0.7.x", "0.7.2"]
- , [">=0.7.x", "0.7.2"]
- , ["=0.7.x", "0.7.0-asdf"]
- , [">=0.7.x", "0.7.0-asdf"]
- , ["<=0.7.x", "0.6.2"]
- ].forEach(function (v) {
- t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1])
- })
- t.end()
-})
-
-test("\nnegative range tests", function (t) {
-; [ ["1.0.0 - 2.0.0", "2.2.3"]
- , ["1.0.0", "1.0.1"]
- , [">=1.0.0", "0.0.0"]
- , [">=1.0.0", "0.0.1"]
- , [">=1.0.0", "0.1.0"]
- , [">1.0.0", "0.0.1"]
- , [">1.0.0", "0.1.0"]
- , ["<=2.0.0", "3.0.0"]
- , ["<=2.0.0", "2.9999.9999"]
- , ["<=2.0.0", "2.2.9"]
- , ["<2.0.0", "2.9999.9999"]
- , ["<2.0.0", "2.2.9"]
- , [">=0.1.97", "v0.1.93"]
- , [">=0.1.97", "0.1.93"]
- , ["0.1.20 || 1.2.4", "1.2.3"]
- , [">=0.2.3 || <0.0.1", "0.0.3"]
- , [">=0.2.3 || <0.0.1", "0.2.2"]
- , ["2.x.x", "1.1.3"]
- , ["2.x.x", "3.1.3"]
- , ["1.2.x", "1.3.3"]
- , ["1.2.x || 2.x", "3.1.3"]
- , ["1.2.x || 2.x", "1.1.3"]
- , ["2.*.*", "1.1.3"]
- , ["2.*.*", "3.1.3"]
- , ["1.2.*", "1.3.3"]
- , ["1.2.* || 2.*", "3.1.3"]
- , ["1.2.* || 2.*", "1.1.3"]
- , ["2", "1.1.2"]
- , ["2.3", "2.4.1"]
- , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0
- , ["~2.4", "2.3.9"]
- , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0
- , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0
- , ["~1", "0.2.3"] // >=1.0.0 <2.0.0
- , ["~>1", "2.2.3"]
- , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0
- , ["<1", "1.0.0"]
- , [">=1.2", "1.1.1"]
- , ["1", "2.0.0beta"]
- , ["~v0.5.4-beta", "0.5.4-alpha"]
- , ["<1", "1.0.0beta"]
- , ["< 1", "1.0.0beta"]
- , ["=0.7.x", "0.8.2"]
- , [">=0.7.x", "0.6.2"]
- , ["<=0.7.x", "0.7.2"]
- ].forEach(function (v) {
- t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1])
- })
- t.end()
-})
-
-test("\nincrement versions test", function (t) {
-; [ [ "1.2.3", "major", "2.0.0" ]
- , [ "1.2.3", "minor", "1.3.0" ]
- , [ "1.2.3", "patch", "1.2.4" ]
- , [ "1.2.3", "build", "1.2.3-1" ]
- , [ "1.2.3-4", "build", "1.2.3-5" ]
- , [ "1.2.3tag", "major", "2.0.0" ]
- , [ "1.2.3-tag", "major", "2.0.0" ]
- , [ "1.2.3tag", "build", "1.2.3-1" ]
- , [ "1.2.3-tag", "build", "1.2.3-1" ]
- , [ "1.2.3-4-tag", "build", "1.2.3-5" ]
- , [ "1.2.3-4tag", "build", "1.2.3-5" ]
- , [ "1.2.3", "fake", null ]
- , [ "fake", "major", null ]
- ].forEach(function (v) {
- t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2])
- })
-
- t.end()
-})
-
-test("\nreplace stars test", function (t) {
-; [ [ "", "" ]
- , [ "*", "" ]
- , [ "> *", "" ]
- , [ "<*", "" ]
- , [ " >= *", "" ]
- , [ "* || 1.2.3", " || 1.2.3" ]
- ].forEach(function (v) {
- t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1])
- })
-
- t.end()
-})
-
-test("\nvalid range test", function (t) {
-; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"]
- , ["1.0.0", "1.0.0"]
- , [">=*", ""]
- , ["", ""]
- , ["*", ""]
- , ["*", ""]
- , [">=1.0.0", ">=1.0.0"]
- , [">1.0.0", ">1.0.0"]
- , ["<=2.0.0", "<=2.0.0"]
- , ["1", ">=1.0.0- <2.0.0-"]
- , ["<=2.0.0", "<=2.0.0"]
- , ["<=2.0.0", "<=2.0.0"]
- , ["<2.0.0", "<2.0.0"]
- , ["<2.0.0", "<2.0.0"]
- , [">= 1.0.0", ">=1.0.0"]
- , [">= 1.0.0", ">=1.0.0"]
- , [">= 1.0.0", ">=1.0.0"]
- , ["> 1.0.0", ">1.0.0"]
- , ["> 1.0.0", ">1.0.0"]
- , ["<= 2.0.0", "<=2.0.0"]
- , ["<= 2.0.0", "<=2.0.0"]
- , ["<= 2.0.0", "<=2.0.0"]
- , ["< 2.0.0", "<2.0.0"]
- , ["< 2.0.0", "<2.0.0"]
- , [">=0.1.97", ">=0.1.97"]
- , [">=0.1.97", ">=0.1.97"]
- , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"]
- , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
- , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
- , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"]
- , ["||", "||"]
- , ["2.x.x", ">=2.0.0- <3.0.0-"]
- , ["1.2.x", ">=1.2.0- <1.3.0-"]
- , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
- , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"]
- , ["x", ""]
- , ["2.*.*", null]
- , ["1.2.*", null]
- , ["1.2.* || 2.*", null]
- , ["1.2.* || 2.*", null]
- , ["*", ""]
- , ["2", ">=2.0.0- <3.0.0-"]
- , ["2.3", ">=2.3.0- <2.4.0-"]
- , ["~2.4", ">=2.4.0- <2.5.0-"]
- , ["~2.4", ">=2.4.0- <2.5.0-"]
- , ["~>3.2.1", ">=3.2.1- <3.3.0-"]
- , ["~1", ">=1.0.0- <2.0.0-"]
- , ["~>1", ">=1.0.0- <2.0.0-"]
- , ["~> 1", ">=1.0.0- <2.0.0-"]
- , ["~1.0", ">=1.0.0- <1.1.0-"]
- , ["~ 1.0", ">=1.0.0- <1.1.0-"]
- , ["<1", "<1.0.0-"]
- , ["< 1", "<1.0.0-"]
- , [">=1", ">=1.0.0-"]
- , [">= 1", ">=1.0.0-"]
- , ["<1.2", "<1.2.0-"]
- , ["< 1.2", "<1.2.0-"]
- , ["1", ">=1.0.0- <2.0.0-"]
- ].forEach(function (v) {
- t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1])
- })
-
- t.end()
-})
-
-test("\ncomparators test", function (t) {
-; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ]
- , ["1.0.0", [["1.0.0"]] ]
- , [">=*", [[">=0.0.0-"]] ]
- , ["", [[""]]]
- , ["*", [[""]] ]
- , ["*", [[""]] ]
- , [">=1.0.0", [[">=1.0.0"]] ]
- , [">=1.0.0", [[">=1.0.0"]] ]
- , [">=1.0.0", [[">=1.0.0"]] ]
- , [">1.0.0", [[">1.0.0"]] ]
- , [">1.0.0", [[">1.0.0"]] ]
- , ["<=2.0.0", [["<=2.0.0"]] ]
- , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["<=2.0.0", [["<=2.0.0"]] ]
- , ["<=2.0.0", [["<=2.0.0"]] ]
- , ["<2.0.0", [["<2.0.0"]] ]
- , ["<2.0.0", [["<2.0.0"]] ]
- , [">= 1.0.0", [[">=1.0.0"]] ]
- , [">= 1.0.0", [[">=1.0.0"]] ]
- , [">= 1.0.0", [[">=1.0.0"]] ]
- , ["> 1.0.0", [[">1.0.0"]] ]
- , ["> 1.0.0", [[">1.0.0"]] ]
- , ["<= 2.0.0", [["<=2.0.0"]] ]
- , ["<= 2.0.0", [["<=2.0.0"]] ]
- , ["<= 2.0.0", [["<=2.0.0"]] ]
- , ["< 2.0.0", [["<2.0.0"]] ]
- , ["<\t2.0.0", [["<2.0.0"]] ]
- , [">=0.1.97", [[">=0.1.97"]] ]
- , [">=0.1.97", [[">=0.1.97"]] ]
- , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ]
- , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
- , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
- , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ]
- , ["||", [[""], [""]] ]
- , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ]
- , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["x", [[""]] ]
- , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ]
- , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ]
- , ["*", [[""]] ]
- , ["2", [[">=2.0.0-", "<3.0.0-"]] ]
- , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ]
- , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
- , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ]
- , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ]
- , ["~1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ]
- , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ]
- , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ]
- , ["<1", [["<1.0.0-"]] ]
- , ["< 1", [["<1.0.0-"]] ]
- , [">=1", [[">=1.0.0-"]] ]
- , [">= 1", [[">=1.0.0-"]] ]
- , ["<1.2", [["<1.2.0-"]] ]
- , ["< 1.2", [["<1.2.0-"]] ]
- , ["1", [[">=1.0.0-", "<2.0.0-"]] ]
- ].forEach(function (v) {
- t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1]))
- })
-
- t.end()
-})
diff --git a/tools/blog/templates/index.ejs b/tools/blog/templates/index.ejs
deleted file mode 100644
index 0db16e570c..0000000000
--- a/tools/blog/templates/index.ejs
+++ /dev/null
@@ -1 +0,0 @@
-This is some ejs