ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [14/52] [partial] incubator-ignite git commit: # ignite-843 WIP.
Date Fri, 08 May 2015 11:36:39 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/index.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/index.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/index.js
new file mode 100644
index 0000000..584f551
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/index.js
@@ -0,0 +1,187 @@
+module.exports = function (args, opts) {
+    if (!opts) opts = {};
+    
+    var flags = { bools : {}, strings : {} };
+    
+    [].concat(opts['boolean']).filter(Boolean).forEach(function (key) {
+        flags.bools[key] = true;
+    });
+    
+    [].concat(opts.string).filter(Boolean).forEach(function (key) {
+        flags.strings[key] = true;
+    });
+    
+    var aliases = {};
+    Object.keys(opts.alias || {}).forEach(function (key) {
+        aliases[key] = [].concat(opts.alias[key]);
+        aliases[key].forEach(function (x) {
+            aliases[x] = [key].concat(aliases[key].filter(function (y) {
+                return x !== y;
+            }));
+        });
+    });
+    
+    var defaults = opts['default'] || {};
+    
+    var argv = { _ : [] };
+    Object.keys(flags.bools).forEach(function (key) {
+        setArg(key, defaults[key] === undefined ? false : defaults[key]);
+    });
+    
+    var notFlags = [];
+
+    if (args.indexOf('--') !== -1) {
+        notFlags = args.slice(args.indexOf('--')+1);
+        args = args.slice(0, args.indexOf('--'));
+    }
+
+    function setArg (key, val) {
+        var value = !flags.strings[key] && isNumber(val)
+            ? Number(val) : val
+        ;
+        setKey(argv, key.split('.'), value);
+        
+        (aliases[key] || []).forEach(function (x) {
+            setKey(argv, x.split('.'), value);
+        });
+    }
+    
+    for (var i = 0; i < args.length; i++) {
+        var arg = args[i];
+        
+        if (/^--.+=/.test(arg)) {
+            // Using [\s\S] instead of . because js doesn't support the
+            // 'dotall' regex modifier. See:
+            // http://stackoverflow.com/a/1068308/13216
+            var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
+            setArg(m[1], m[2]);
+        }
+        else if (/^--no-.+/.test(arg)) {
+            var key = arg.match(/^--no-(.+)/)[1];
+            setArg(key, false);
+        }
+        else if (/^--.+/.test(arg)) {
+            var key = arg.match(/^--(.+)/)[1];
+            var next = args[i + 1];
+            if (next !== undefined && !/^-/.test(next)
+            && !flags.bools[key]
+            && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+                setArg(key, next);
+                i++;
+            }
+            else if (/^(true|false)$/.test(next)) {
+                setArg(key, next === 'true');
+                i++;
+            }
+            else {
+                setArg(key, flags.strings[key] ? '' : true);
+            }
+        }
+        else if (/^-[^-]+/.test(arg)) {
+            var letters = arg.slice(1,-1).split('');
+            
+            var broken = false;
+            for (var j = 0; j < letters.length; j++) {
+                var next = arg.slice(j+2);
+                
+                if (next === '-') {
+                    setArg(letters[j], next)
+                    continue;
+                }
+                
+                if (/[A-Za-z]/.test(letters[j])
+                && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
+                    setArg(letters[j], next);
+                    broken = true;
+                    break;
+                }
+                
+                if (letters[j+1] && letters[j+1].match(/\W/)) {
+                    setArg(letters[j], arg.slice(j+2));
+                    broken = true;
+                    break;
+                }
+                else {
+                    setArg(letters[j], flags.strings[letters[j]] ? '' : true);
+                }
+            }
+            
+            var key = arg.slice(-1)[0];
+            if (!broken && key !== '-') {
+                if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1])
+                && !flags.bools[key]
+                && (aliases[key] ? !flags.bools[aliases[key]] : true)) {
+                    setArg(key, args[i+1]);
+                    i++;
+                }
+                else if (args[i+1] && /true|false/.test(args[i+1])) {
+                    setArg(key, args[i+1] === 'true');
+                    i++;
+                }
+                else {
+                    setArg(key, flags.strings[key] ? '' : true);
+                }
+            }
+        }
+        else {
+            argv._.push(
+                flags.strings['_'] || !isNumber(arg) ? arg : Number(arg)
+            );
+        }
+    }
+    
+    Object.keys(defaults).forEach(function (key) {
+        if (!hasKey(argv, key.split('.'))) {
+            setKey(argv, key.split('.'), defaults[key]);
+            
+            (aliases[key] || []).forEach(function (x) {
+                setKey(argv, x.split('.'), defaults[key]);
+            });
+        }
+    });
+    
+    notFlags.forEach(function(key) {
+        argv._.push(key);
+    });
+
+    return argv;
+};
+
+function hasKey (obj, keys) {
+    var o = obj;
+    keys.slice(0,-1).forEach(function (key) {
+        o = (o[key] || {});
+    });
+
+    var key = keys[keys.length - 1];
+    return key in o;
+}
+
+function setKey (obj, keys, value) {
+    var o = obj;
+    keys.slice(0,-1).forEach(function (key) {
+        if (o[key] === undefined) o[key] = {};
+        o = o[key];
+    });
+    
+    var key = keys[keys.length - 1];
+    if (o[key] === undefined || typeof o[key] === 'boolean') {
+        o[key] = value;
+    }
+    else if (Array.isArray(o[key])) {
+        o[key].push(value);
+    }
+    else {
+        o[key] = [ o[key], value ];
+    }
+}
+
+function isNumber (x) {
+    if (typeof x === 'number') return true;
+    if (/^0x[0-9a-f]+$/i.test(x)) return true;
+    return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
+}
+
+function longest (xs) {
+    return Math.max.apply(null, xs.map(function (x) { return x.length }));
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/package.json b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/package.json
new file mode 100644
index 0000000..09e9ec4
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/package.json
@@ -0,0 +1,67 @@
+{
+  "name": "minimist",
+  "version": "0.0.8",
+  "description": "parse argument options",
+  "main": "index.js",
+  "devDependencies": {
+    "tape": "~1.0.4",
+    "tap": "~0.4.0"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "testling": {
+    "files": "test/*.js",
+    "browsers": [
+      "ie/6..latest",
+      "ff/5",
+      "firefox/latest",
+      "chrome/10",
+      "chrome/latest",
+      "safari/5.1",
+      "safari/latest",
+      "opera/12"
+    ]
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/substack/minimist.git"
+  },
+  "homepage": "https://github.com/substack/minimist",
+  "keywords": [
+    "argv",
+    "getopt",
+    "parser",
+    "optimist"
+  ],
+  "author": {
+    "name": "James Halliday",
+    "email": "mail@substack.net",
+    "url": "http://substack.net"
+  },
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/substack/minimist/issues"
+  },
+  "_id": "minimist@0.0.8",
+  "dist": {
+    "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
+    "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz"
+  },
+  "_from": "minimist@0.0.8",
+  "_npmVersion": "1.4.3",
+  "_npmUser": {
+    "name": "substack",
+    "email": "mail@substack.net"
+  },
+  "maintainers": [
+    {
+      "name": "substack",
+      "email": "mail@substack.net"
+    }
+  ],
+  "directories": {},
+  "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d",
+  "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+  "readme": "ERROR: No README data found!"
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/readme.markdown
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/readme.markdown b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/readme.markdown
new file mode 100644
index 0000000..c256353
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/readme.markdown
@@ -0,0 +1,73 @@
+# minimist
+
+parse argument options
+
+This module is the guts of optimist's argument parser without all the
+fanciful decoration.
+
+[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)
+
+[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)
+
+# example
+
+``` js
+var argv = require('minimist')(process.argv.slice(2));
+console.dir(argv);
+```
+
+```
+$ node example/parse.js -a beep -b boop
+{ _: [], a: 'beep', b: 'boop' }
+```
+
+```
+$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+{ _: [ 'foo', 'bar', 'baz' ],
+  x: 3,
+  y: 4,
+  n: 5,
+  a: true,
+  b: true,
+  c: true,
+  beep: 'boop' }
+```
+
+# methods
+
+``` js
+var parseArgs = require('minimist')
+```
+
+## var argv = parseArgs(args, opts={})
+
+Return an argument object `argv` populated with the array arguments from `args`.
+
+`argv._` contains all the arguments that didn't have an option associated with
+them.
+
+Numeric-looking arguments will be returned as numbers unless `opts.string` or
+`opts.boolean` is set for that argument name.
+
+Any arguments after `'--'` will not be parsed and will end up in `argv._`.
+
+options can be:
+
+* `opts.string` - a string or array of strings argument names to always treat as
+strings
+* `opts.boolean` - a string or array of strings to always treat as booleans
+* `opts.alias` - an object mapping string names to strings or arrays of string
+argument names to use as aliases
+* `opts.default` - an object mapping string argument names to default values
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install minimist
+```
+
+# license
+
+MIT

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dash.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dash.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dash.js
new file mode 100644
index 0000000..8b034b9
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dash.js
@@ -0,0 +1,24 @@
+var parse = require('../');
+var test = require('tape');
+
+test('-', function (t) {
+    t.plan(5);
+    t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] });
+    t.deepEqual(parse([ '-' ]), { _: [ '-' ] });
+    t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] });
+    t.deepEqual(
+        parse([ '-b', '-' ], { boolean: 'b' }),
+        { b: true, _: [ '-' ] }
+    );
+    t.deepEqual(
+        parse([ '-s', '-' ], { string: 's' }),
+        { s: '-', _: [] }
+    );
+});
+
+test('-a -- b', function (t) {
+    t.plan(3);
+    t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+    t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+    t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
new file mode 100644
index 0000000..f0041ee
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/default_bool.js
@@ -0,0 +1,20 @@
+var test = require('tape');
+var parse = require('../');
+
+test('boolean default true', function (t) {
+    var argv = parse([], {
+        boolean: 'sometrue',
+        default: { sometrue: true }
+    });
+    t.equal(argv.sometrue, true);
+    t.end();
+});
+
+test('boolean default false', function (t) {
+    var argv = parse([], {
+        boolean: 'somefalse',
+        default: { somefalse: false }
+    });
+    t.equal(argv.somefalse, false);
+    t.end();
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dotted.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dotted.js
new file mode 100644
index 0000000..ef0ae34
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/dotted.js
@@ -0,0 +1,16 @@
+var parse = require('../');
+var test = require('tape');
+
+test('dotted alias', function (t) {
+    var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+    t.equal(argv.a.b, 22);
+    t.equal(argv.aa.bb, 22);
+    t.end();
+});
+
+test('dotted default', function (t) {
+    var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}});
+    t.equal(argv.a.b, 11);
+    t.equal(argv.aa.bb, 11);
+    t.end();
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/long.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/long.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/long.js
new file mode 100644
index 0000000..5d3a1e0
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/long.js
@@ -0,0 +1,31 @@
+var test = require('tape');
+var parse = require('../');
+
+test('long opts', function (t) {
+    t.deepEqual(
+        parse([ '--bool' ]),
+        { bool : true, _ : [] },
+        'long boolean'
+    );
+    t.deepEqual(
+        parse([ '--pow', 'xixxle' ]),
+        { pow : 'xixxle', _ : [] },
+        'long capture sp'
+    );
+    t.deepEqual(
+        parse([ '--pow=xixxle' ]),
+        { pow : 'xixxle', _ : [] },
+        'long capture eq'
+    );
+    t.deepEqual(
+        parse([ '--host', 'localhost', '--port', '555' ]),
+        { host : 'localhost', port : 555, _ : [] },
+        'long captures sp'
+    );
+    t.deepEqual(
+        parse([ '--host=localhost', '--port=555' ]),
+        { host : 'localhost', port : 555, _ : [] },
+        'long captures eq'
+    );
+    t.end();
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse.js
new file mode 100644
index 0000000..8a90646
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse.js
@@ -0,0 +1,318 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse args', function (t) {
+    t.deepEqual(
+        parse([ '--no-moo' ]),
+        { moo : false, _ : [] },
+        'no'
+    );
+    t.deepEqual(
+        parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]),
+        { v : ['a','b','c'], _ : [] },
+        'multi'
+    );
+    t.end();
+});
+ 
+test('comprehensive', function (t) {
+    t.deepEqual(
+        parse([
+            '--name=meowmers', 'bare', '-cats', 'woo',
+            '-h', 'awesome', '--multi=quux',
+            '--key', 'value',
+            '-b', '--bool', '--no-meep', '--multi=baz',
+            '--', '--not-a-flag', 'eek'
+        ]),
+        {
+            c : true,
+            a : true,
+            t : true,
+            s : 'woo',
+            h : 'awesome',
+            b : true,
+            bool : true,
+            key : 'value',
+            multi : [ 'quux', 'baz' ],
+            meep : false,
+            name : 'meowmers',
+            _ : [ 'bare', '--not-a-flag', 'eek' ]
+        }
+    );
+    t.end();
+});
+
+test('nums', function (t) {
+    var argv = parse([
+        '-x', '1234',
+        '-y', '5.67',
+        '-z', '1e7',
+        '-w', '10f',
+        '--hex', '0xdeadbeef',
+        '789'
+    ]);
+    t.deepEqual(argv, {
+        x : 1234,
+        y : 5.67,
+        z : 1e7,
+        w : '10f',
+        hex : 0xdeadbeef,
+        _ : [ 789 ]
+    });
+    t.deepEqual(typeof argv.x, 'number');
+    t.deepEqual(typeof argv.y, 'number');
+    t.deepEqual(typeof argv.z, 'number');
+    t.deepEqual(typeof argv.w, 'string');
+    t.deepEqual(typeof argv.hex, 'number');
+    t.deepEqual(typeof argv._[0], 'number');
+    t.end();
+});
+
+test('flag boolean', function (t) {
+    var argv = parse([ '-t', 'moo' ], { boolean: 't' });
+    t.deepEqual(argv, { t : true, _ : [ 'moo' ] });
+    t.deepEqual(typeof argv.t, 'boolean');
+    t.end();
+});
+
+test('flag boolean value', function (t) {
+    var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], {
+        boolean: [ 't', 'verbose' ],
+        default: { verbose: true }
+    });
+    
+    t.deepEqual(argv, {
+        verbose: false,
+        t: true,
+        _: ['moo']
+    });
+    
+    t.deepEqual(typeof argv.verbose, 'boolean');
+    t.deepEqual(typeof argv.t, 'boolean');
+    t.end();
+});
+
+test('flag boolean default false', function (t) {
+    var argv = parse(['moo'], {
+        boolean: ['t', 'verbose'],
+        default: { verbose: false, t: false }
+    });
+    
+    t.deepEqual(argv, {
+        verbose: false,
+        t: false,
+        _: ['moo']
+    });
+    
+    t.deepEqual(typeof argv.verbose, 'boolean');
+    t.deepEqual(typeof argv.t, 'boolean');
+    t.end();
+
+});
+
+test('boolean groups', function (t) {
+    var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], {
+        boolean: ['x','y','z']
+    });
+    
+    t.deepEqual(argv, {
+        x : true,
+        y : false,
+        z : true,
+        _ : [ 'one', 'two', 'three' ]
+    });
+    
+    t.deepEqual(typeof argv.x, 'boolean');
+    t.deepEqual(typeof argv.y, 'boolean');
+    t.deepEqual(typeof argv.z, 'boolean');
+    t.end();
+});
+
+test('newlines in params' , function (t) {
+    var args = parse([ '-s', "X\nX" ])
+    t.deepEqual(args, { _ : [], s : "X\nX" });
+    
+    // reproduce in bash:
+    // VALUE="new
+    // line"
+    // node program.js --s="$VALUE"
+    args = parse([ "--s=X\nX" ])
+    t.deepEqual(args, { _ : [], s : "X\nX" });
+    t.end();
+});
+
+test('strings' , function (t) {
+    var s = parse([ '-s', '0001234' ], { string: 's' }).s;
+    t.equal(s, '0001234');
+    t.equal(typeof s, 'string');
+    
+    var x = parse([ '-x', '56' ], { string: 'x' }).x;
+    t.equal(x, '56');
+    t.equal(typeof x, 'string');
+    t.end();
+});
+
+test('stringArgs', function (t) {
+    var s = parse([ '  ', '  ' ], { string: '_' })._;
+    t.same(s.length, 2);
+    t.same(typeof s[0], 'string');
+    t.same(s[0], '  ');
+    t.same(typeof s[1], 'string');
+    t.same(s[1], '  ');
+    t.end();
+});
+
+test('empty strings', function(t) {
+    var s = parse([ '-s' ], { string: 's' }).s;
+    t.equal(s, '');
+    t.equal(typeof s, 'string');
+
+    var str = parse([ '--str' ], { string: 'str' }).str;
+    t.equal(str, '');
+    t.equal(typeof str, 'string');
+
+    var letters = parse([ '-art' ], {
+        string: [ 'a', 't' ]
+    });
+
+    t.equal(letters.a, '');
+    t.equal(letters.r, true);
+    t.equal(letters.t, '');
+
+    t.end();
+});
+
+
+test('slashBreak', function (t) {
+    t.same(
+        parse([ '-I/foo/bar/baz' ]),
+        { I : '/foo/bar/baz', _ : [] }
+    );
+    t.same(
+        parse([ '-xyz/foo/bar/baz' ]),
+        { x : true, y : true, z : '/foo/bar/baz', _ : [] }
+    );
+    t.end();
+});
+
+test('alias', function (t) {
+    var argv = parse([ '-f', '11', '--zoom', '55' ], {
+        alias: { z: 'zoom' }
+    });
+    t.equal(argv.zoom, 55);
+    t.equal(argv.z, argv.zoom);
+    t.equal(argv.f, 11);
+    t.end();
+});
+
+test('multiAlias', function (t) {
+    var argv = parse([ '-f', '11', '--zoom', '55' ], {
+        alias: { z: [ 'zm', 'zoom' ] }
+    });
+    t.equal(argv.zoom, 55);
+    t.equal(argv.z, argv.zoom);
+    t.equal(argv.z, argv.zm);
+    t.equal(argv.f, 11);
+    t.end();
+});
+
+test('nested dotted objects', function (t) {
+    var argv = parse([
+        '--foo.bar', '3', '--foo.baz', '4',
+        '--foo.quux.quibble', '5', '--foo.quux.o_O',
+        '--beep.boop'
+    ]);
+    
+    t.same(argv.foo, {
+        bar : 3,
+        baz : 4,
+        quux : {
+            quibble : 5,
+            o_O : true
+        }
+    });
+    t.same(argv.beep, { boop : true });
+    t.end();
+});
+
+test('boolean and alias with chainable api', function (t) {
+    var aliased = [ '-h', 'derp' ];
+    var regular = [ '--herp',  'derp' ];
+    var opts = {
+        herp: { alias: 'h', boolean: true }
+    };
+    var aliasedArgv = parse(aliased, {
+        boolean: 'herp',
+        alias: { h: 'herp' }
+    });
+    var propertyArgv = parse(regular, {
+        boolean: 'herp',
+        alias: { h: 'herp' }
+    });
+    var expected = {
+        herp: true,
+        h: true,
+        '_': [ 'derp' ]
+    };
+    
+    t.same(aliasedArgv, expected);
+    t.same(propertyArgv, expected); 
+    t.end();
+});
+
+test('boolean and alias with options hash', function (t) {
+    var aliased = [ '-h', 'derp' ];
+    var regular = [ '--herp', 'derp' ];
+    var opts = {
+        alias: { 'h': 'herp' },
+        boolean: 'herp'
+    };
+    var aliasedArgv = parse(aliased, opts);
+    var propertyArgv = parse(regular, opts);
+    var expected = {
+        herp: true,
+        h: true,
+        '_': [ 'derp' ]
+    };
+    t.same(aliasedArgv, expected);
+    t.same(propertyArgv, expected);
+    t.end();
+});
+
+test('boolean and alias using explicit true', function (t) {
+    var aliased = [ '-h', 'true' ];
+    var regular = [ '--herp',  'true' ];
+    var opts = {
+        alias: { h: 'herp' },
+        boolean: 'h'
+    };
+    var aliasedArgv = parse(aliased, opts);
+    var propertyArgv = parse(regular, opts);
+    var expected = {
+        herp: true,
+        h: true,
+        '_': [ ]
+    };
+
+    t.same(aliasedArgv, expected);
+    t.same(propertyArgv, expected); 
+    t.end();
+});
+
+// regression, see https://github.com/substack/node-optimist/issues/71
+test('boolean and --x=true', function(t) {
+    var parsed = parse(['--boool', '--other=true'], {
+        boolean: 'boool'
+    });
+
+    t.same(parsed.boool, true);
+    t.same(parsed.other, 'true');
+
+    parsed = parse(['--boool', '--other=false'], {
+        boolean: 'boool'
+    });
+    
+    t.same(parsed.boool, true);
+    t.same(parsed.other, 'false');
+    t.end();
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
new file mode 100644
index 0000000..21851b0
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js
@@ -0,0 +1,9 @@
+var parse = require('../');
+var test = require('tape');
+
+test('parse with modifier functions' , function (t) {
+    t.plan(1);
+    
+    var argv = parse([ '-b', '123' ], { boolean: 'b' });
+    t.deepEqual(argv, { b: true, _: ['123'] });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/short.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/short.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/short.js
new file mode 100644
index 0000000..d513a1c
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/short.js
@@ -0,0 +1,67 @@
+var parse = require('../');
+var test = require('tape');
+
+test('numeric short args', function (t) {
+    t.plan(2);
+    t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] });
+    t.deepEqual(
+        parse([ '-123', '456' ]),
+        { 1: true, 2: true, 3: 456, _: [] }
+    );
+});
+
+test('short', function (t) {
+    t.deepEqual(
+        parse([ '-b' ]),
+        { b : true, _ : [] },
+        'short boolean'
+    );
+    t.deepEqual(
+        parse([ 'foo', 'bar', 'baz' ]),
+        { _ : [ 'foo', 'bar', 'baz' ] },
+        'bare'
+    );
+    t.deepEqual(
+        parse([ '-cats' ]),
+        { c : true, a : true, t : true, s : true, _ : [] },
+        'group'
+    );
+    t.deepEqual(
+        parse([ '-cats', 'meow' ]),
+        { c : true, a : true, t : true, s : 'meow', _ : [] },
+        'short group next'
+    );
+    t.deepEqual(
+        parse([ '-h', 'localhost' ]),
+        { h : 'localhost', _ : [] },
+        'short capture'
+    );
+    t.deepEqual(
+        parse([ '-h', 'localhost', '-p', '555' ]),
+        { h : 'localhost', p : 555, _ : [] },
+        'short captures'
+    );
+    t.end();
+});
+ 
+test('mixed short bool and capture', function (t) {
+    t.same(
+        parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+        {
+            f : true, p : 555, h : 'localhost',
+            _ : [ 'script.js' ]
+        }
+    );
+    t.end();
+});
+ 
+test('short and long', function (t) {
+    t.deepEqual(
+        parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]),
+        {
+            f : true, p : 555, h : 'localhost',
+            _ : [ 'script.js' ]
+        }
+    );
+    t.end();
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
new file mode 100644
index 0000000..8a52a58
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/node_modules/minimist/test/whitespace.js
@@ -0,0 +1,8 @@
+var parse = require('../');
+var test = require('tape');
+
+test('whitespace should be whitespace' , function (t) {
+    t.plan(1);
+    var x = parse([ '-x', '\t' ]).x;
+    t.equal(x, '\t');
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/package.json b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/package.json
new file mode 100644
index 0000000..f3adb5b
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/package.json
@@ -0,0 +1,58 @@
+{
+  "name": "mkdirp",
+  "description": "Recursively mkdir, like `mkdir -p`",
+  "version": "0.5.0",
+  "author": {
+    "name": "James Halliday",
+    "email": "mail@substack.net",
+    "url": "http://substack.net"
+  },
+  "main": "./index",
+  "keywords": [
+    "mkdir",
+    "directory"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/substack/node-mkdirp.git"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "dependencies": {
+    "minimist": "0.0.8"
+  },
+  "devDependencies": {
+    "tap": "~0.4.0",
+    "mock-fs": "~2.2.0"
+  },
+  "bin": {
+    "mkdirp": "bin/cmd.js"
+  },
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/substack/node-mkdirp/issues"
+  },
+  "homepage": "https://github.com/substack/node-mkdirp",
+  "_id": "mkdirp@0.5.0",
+  "dist": {
+    "shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12",
+    "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz"
+  },
+  "_from": "mkdirp@>=0.5.0 <0.6.0",
+  "_npmVersion": "1.4.3",
+  "_npmUser": {
+    "name": "substack",
+    "email": "mail@substack.net"
+  },
+  "maintainers": [
+    {
+      "name": "substack",
+      "email": "mail@substack.net"
+    }
+  ],
+  "directories": {},
+  "_shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12",
+  "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
+  "readme": "ERROR: No README data found!"
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/readme.markdown
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/readme.markdown b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/readme.markdown
new file mode 100644
index 0000000..3cc1315
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,100 @@
+# 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
+
+```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
+
+```js
+var mkdirp = require('mkdirp');
+```
+
+## mkdirp(dir, opts, cb)
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `opts.mode`. If `opts` is a non-object, it will be treated as
+the `opts.mode`.
+
+If `opts.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.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and
+`opts.fs.stat(path, cb)`.
+
+## mkdirp.sync(dir, opts)
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `opts.mode`. If `opts` is a non-object, it will be
+treated as the `opts.mode`.
+
+If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+Returns the first directory that had to be created, if any.
+
+You can optionally pass in an alternate `fs` implementation by passing in
+`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and
+`opts.fs.statSync(path)`.
+
+# usage
+
+This package also ships with a `mkdirp` command.
+
+```
+usage: mkdirp [DIR1,DIR2..] {OPTIONS}
+
+  Create each supplied directory including any necessary parent directories that
+  don't yet exist.
+  
+  If the directory already exists, do nothing.
+
+OPTIONS are:
+
+  -m, --mode   If a directory needs to be created, set the mode as an octal
+               permission string.
+
+```
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+to get the library, or
+
+```
+npm install -g mkdirp
+```
+
+to get the command.
+
+# license
+
+MIT

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/chmod.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/chmod.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/chmod.js
new file mode 100644
index 0000000..520dcb8
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/chmod.js
@@ -0,0 +1,38 @@
+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();
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/clobber.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/clobber.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/clobber.js
new file mode 100644
index 0000000..0eb709987
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/clobber.js
@@ -0,0 +1,37 @@
+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();
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/mkdirp.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
new file mode 100644
index 0000000..3b624dd
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
@@ -0,0 +1,26 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('woo', function (t) {
+    t.plan(5);
+    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) {
+        t.ifError(err);
+        exists(file, function (ex) {
+            t.ok(ex, 'file created');
+            fs.stat(file, function (err, stat) {
+                t.ifError(err);
+                t.equal(stat.mode & 0777, 0755);
+                t.ok(stat.isDirectory(), 'target not a directory');
+            })
+        })
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs.js
new file mode 100644
index 0000000..f1fbeca
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs.js
@@ -0,0 +1,27 @@
+var mkdirp = require('../');
+var path = require('path');
+var test = require('tap').test;
+var mockfs = require('mock-fs');
+
+test('opts.fs', function (t) {
+    t.plan(5);
+    
+    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 = '/beep/boop/' + [x,y,z].join('/');
+    var xfs = mockfs.fs();
+    
+    mkdirp(file, { fs: xfs, mode: 0755 }, function (err) {
+        t.ifError(err);
+        xfs.exists(file, function (ex) {
+            t.ok(ex, 'created file');
+            xfs.stat(file, function (err, stat) {
+                t.ifError(err);
+                t.equal(stat.mode & 0777, 0755);
+                t.ok(stat.isDirectory(), 'target not a directory');
+            });
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs_sync.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs_sync.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs_sync.js
new file mode 100644
index 0000000..224b506
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/opts_fs_sync.js
@@ -0,0 +1,25 @@
+var mkdirp = require('../');
+var path = require('path');
+var test = require('tap').test;
+var mockfs = require('mock-fs');
+
+test('opts.fs sync', 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 = '/beep/boop/' + [x,y,z].join('/');
+    var xfs = mockfs.fs();
+    
+    mkdirp.sync(file, { fs: xfs, mode: 0755 });
+    xfs.exists(file, function (ex) {
+        t.ok(ex, 'created file');
+        xfs.stat(file, function (err, stat) {
+            t.ifError(err);
+            t.equal(stat.mode & 0777, 0755);
+            t.ok(stat.isDirectory(), 'target not a directory');
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm.js
new file mode 100644
index 0000000..2c97590
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('async perm', function (t) {
+    t.plan(5);
+    var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
+    
+    mkdirp(file, 0755, function (err) {
+        t.ifError(err);
+        exists(file, function (ex) {
+            t.ok(ex, 'file created');
+            fs.stat(file, function (err, stat) {
+                t.ifError(err);
+                t.equal(stat.mode & 0777, 0755);
+                t.ok(stat.isDirectory(), 'target not a directory');
+            })
+        })
+    });
+});
+
+test('async root perm', function (t) {
+    mkdirp('/tmp', 0755, function (err) {
+        if (err) t.fail(err);
+        t.end();
+    });
+    t.end();
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm_sync.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm_sync.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm_sync.js
new file mode 100644
index 0000000..327e54b
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/perm_sync.js
@@ -0,0 +1,34 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('sync perm', function (t) {
+    t.plan(4);
+    var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
+    
+    mkdirp.sync(file, 0755);
+    exists(file, function (ex) {
+        t.ok(ex, 'file created');
+        fs.stat(file, function (err, stat) {
+            t.ifError(err);
+            t.equal(stat.mode & 0777, 0755);
+            t.ok(stat.isDirectory(), 'target not a directory');
+        });
+    });
+});
+
+test('sync root perm', function (t) {
+    t.plan(3);
+    
+    var file = '/tmp';
+    mkdirp.sync(file, 0755);
+    exists(file, function (ex) {
+        t.ok(ex, 'file created');
+        fs.stat(file, function (err, stat) {
+            t.ifError(err);
+            t.ok(stat.isDirectory(), 'target not a directory');
+        })
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/race.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/race.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/race.js
new file mode 100644
index 0000000..7c295f4
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/race.js
@@ -0,0 +1,40 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('race', function (t) {
+    t.plan(6);
+    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) {
+            t.ifError(err);
+            exists(file, function (ex) {
+                t.ok(ex, 'file created');
+                fs.stat(file, function (err, stat) {
+                    t.ifError(err);
+                    t.equal(stat.mode & 0777, 0755);
+                    t.ok(stat.isDirectory(), 'target not a directory');
+                    if (cb) cb();
+                });
+            })
+        });
+    }
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/rel.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/rel.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/rel.js
new file mode 100644
index 0000000..d1f175c
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/rel.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('rel', function (t) {
+    t.plan(5);
+    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) {
+        t.ifError(err);
+        exists(file, function (ex) {
+            t.ok(ex, 'file created');
+            fs.stat(file, function (err, stat) {
+                t.ifError(err);
+                process.chdir(cwd);
+                t.equal(stat.mode & 0777, 0755);
+                t.ok(stat.isDirectory(), 'target not a directory');
+            })
+        })
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return.js
new file mode 100644
index 0000000..bce68e5
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return.js
@@ -0,0 +1,25 @@
+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);
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return_sync.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return_sync.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return_sync.js
new file mode 100644
index 0000000..7c222d3
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/return_sync.js
@@ -0,0 +1,24 @@
+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);
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/root.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/root.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/root.js
new file mode 100644
index 0000000..97ad7a2
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/root.js
@@ -0,0 +1,18 @@
+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();
+        })
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/sync.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/sync.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/sync.js
new file mode 100644
index 0000000..88fa432
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/sync.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('sync', 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('/');
+
+    try {
+        mkdirp.sync(file, 0755);
+    } catch (err) {
+        t.fail(err);
+        return t.end();
+    }
+
+    exists(file, function (ex) {
+        t.ok(ex, 'file created');
+        fs.stat(file, function (err, stat) {
+            t.ifError(err);
+            t.equal(stat.mode & 0777, 0755);
+            t.ok(stat.isDirectory(), 'target not a directory');
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask.js
new file mode 100644
index 0000000..82c393a
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask.js
@@ -0,0 +1,26 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('implicit mode from umask', function (t) {
+    t.plan(5);
+    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) {
+        t.ifError(err);
+        exists(file, function (ex) {
+            t.ok(ex, 'file created');
+            fs.stat(file, function (err, stat) {
+                t.ifError(err);
+                t.equal(stat.mode & 0777, 0777 & (~process.umask()));
+                t.ok(stat.isDirectory(), 'target not a directory');
+            });
+        })
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask_sync.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask_sync.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask_sync.js
new file mode 100644
index 0000000..e537fbe
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/mkdirp/test/umask_sync.js
@@ -0,0 +1,30 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var exists = fs.exists || path.exists;
+var test = require('tap').test;
+
+test('umask sync modes', 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('/');
+
+    try {
+        mkdirp.sync(file);
+    } catch (err) {
+        t.fail(err);
+        return t.end();
+    }
+
+    exists(file, function (ex) {
+        t.ok(ex, 'file created');
+        fs.stat(file, function (err, stat) {
+            t.ifError(err);
+            t.equal(stat.mode & 0777, (0777 & (~process.umask())));
+            t.ok(stat.isDirectory(), 'target not a directory');
+        });
+    });
+});

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/.npmignore
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/.npmignore b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/.npmignore
new file mode 100644
index 0000000..cefaa67
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/.npmignore
@@ -0,0 +1,2 @@
+test/
+.travis.yml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/README.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/README.md b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/README.md
new file mode 100644
index 0000000..9a5b287
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/README.md
@@ -0,0 +1,141 @@
+[![Build Status](https://travis-ci.org/ForbesLindesay/transformers.png?branch=master)](https://travis-ci.org/ForbesLindesay/transformers)
+# transformers
+
+  String/Data transformations for use in templating libraries, static site generators and web frameworks.  This gathers the most useful transformations you can apply to text or data into one library with a consistent API.  Transformations can be pretty much anything but most are either compilers or templating engines.
+
+## Supported transforms
+
+  To use each of these transforms you will also need to install the associated npm module for that transformer.
+
+### Template engines
+
+  - [atpl](http://documentup.com/soywiz/atpl.js) - Compatible with twig templates
+  - [coffeecup](http://documentup.com/gradus/coffeecup) - pure coffee-script templates (fork of coffeekup)
+  - [dot](http://documentup.com/olado/doT) [(website)](https://github.com/Katahdin/dot-packer) - focused on speed
+  - [dust](http://documentup.com/akdubya/dustjs) [(website)](http://akdubya.github.com/dustjs/) - asyncronous templates
+  - [eco](http://documentup.com/sstephenson/eco) - Embedded CoffeeScript templates
+  - [ect](http://documentup.com/baryshev/ect) [(website)](http://ectjs.com/) - Embedded CoffeeScript templates
+  - [ejs](http://documentup.com/visionmedia/ejs) - Embedded JavaScript templates
+  - [haml](http://documentup.com/visionmedia/haml.js) [(website)](http://haml-lang.com/) - dry indented markup
+  - [haml-coffee](http://documentup.com/netzpirat/haml-coffee/) [(website)](http://haml-lang.com/) - haml with embedded CoffeeScript
+  - [handlebars](http://documentup.com/wycats/handlebars.js/) [(website)](http://handlebarsjs.com/) - extension of mustache templates
+  - [hogan](http://documentup.com/twitter/hogan.js) [(website)](http://twitter.github.com/hogan.js/) - Mustache templates
+  - [jade](http://documentup.com/visionmedia/jade) [(website)](http://jade-lang.com/) - robust, elegant, feature rich template engine
+  - [jazz](http://documentup.com/shinetech/jazz)
+  - [jqtpl](http://documentup.com/kof/jqtpl) [(website)](http://api.jquery.com/category/plugins/templates/) - extensible logic-less templates
+  - [JUST](http://documentup.com/baryshev/just) - EJS style template with some special syntax for layouts/partials etc.
+  - [liquor](http://documentup.com/chjj/liquor) - extended EJS with significant white space
+  - [mustache](http://documentup.com/janl/mustache.js) - logic less templates
+  - [QEJS](http://documentup.com/jepso/QEJS) - Promises + EJS for async templating
+  - [swig](http://documentup.com/paularmstrong/swig) [(website)](http://paularmstrong.github.com/swig/) - Django-like templating engine
+  - [templayed](http://documentup.com/archan937/templayed.js/) [(website)](http://archan937.github.com/templayed.js/) - Mustache focused on performance
+  - [toffee](http://documentup.com/malgorithms/toffee) - templating language based on coffeescript
+  - [underscore](http://documentup.com/documentcloud/underscore) [(website)](http://documentcloud.github.com/underscore/)
+  - [walrus](http://documentup.com/jeremyruppel/walrus) - A bolder kind of mustache
+  - [whiskers](http://documentup.com/gsf/whiskers.js/tree/) - logic-less focused on readability
+
+### Stylesheet Languages
+
+  - [less](http://documentup.com/cloudhead/less.js) [(website)](http://lesscss.org/) - LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.
+  - [stylus](http://documentup.com/learnboost/stylus) [(website)](http://learnboost.github.com/stylus/) - revolutionary CSS generator making braces optional
+  - [sass](http://documentup.com/visionmedia/sass.js) [(website)](http://sass-lang.com/) - Sassy CSS
+
+### Minifiers
+
+  - [uglify-js](http://documentup.com/mishoo/UglifyJS2) - No need to install anything, just minifies/beautifies JavaScript
+  - [uglify-css](https://github.com/visionmedia/css) - No need to install anything, just minifies/beautifies CSS
+  - ugilify-json - No need to install anything, just minifies/beautifies JSON
+
+### Other
+
+  - cdata - No need to install anything, just wraps input as `<![CDATA[${INPUT_STRING]]>` with the standard escape for `]]>` (`]]]]><![CDATA[>`).
+  - cdata-js - as `cdata`, but with surrounding comments suitable for inclusion into a HTML/JavaScript `<script>` block: `//<![CDATA[\n${INPUT_STRING\n//]]>`.
+  - cdata-css - as `cdata`, but with surrounding comments suitable for inclusion into a HTML/CSS `<style>` block: `/*<![CDATA[*/\n${INPUT_STRING\n/*]]>*/`.
+  - verbatim - No need to install anything, acts as a verbatim passthrough `${INPUT_STRING}`
+  - [coffee-script](http://coffeescript.org/) - `npm install coffee-script`
+  - [cson](https://github.com/bevry/cson) - coffee-script based JSON format
+  - markdown - You can use `marked`, `supermarked`, `markdown-js` or `markdown`
+  - [component-js](http://documentup.com/component/component) [(website)](http://component.io) - `npm install component-builder` options: `{development: false}`
+  - [component-css](http://documentup.com/component/component) [(website)](http://component.io) - `npm install component-builder` options: `{development: false}`
+  - [html2jade](http://documentup.com/donpark/html2jade) [(website)](http://html2jade.aaron-powell.com/) - `npm install html2jade` - Converts HTML back into jade
+
+Pull requests to add more transforms will always be accepted providing they are open-source, come with unit tests, and don't cause any of the tests to fail.
+
+## API
+
+  The exported object `transformers` is a collection of named transformers.  To access an individual transformer just do:
+
+  ```javascript
+  var transformer = require('transformers')['transformer-name']
+  ```
+
+### Transformer
+
+  The following options are given special meaning by `transformers`:
+
+   - `filename` is set by transformers automatically if using the `renderFile` APIs.  It is used if `cache` is enabled.
+   - `cache` if true, the template function will be cached where possible (templates are still updated if you provide new options, so this can be used in most live applications).
+   - `sudoSync` used internally to put some asyncronous transformers into "sudo syncronous" mode.  Don't touch this.
+   - `minify` if set to true on a transformer that isn't a minifier, it will cause the output to be minified.  e.g. `coffeeScript.renderSync(str, {minify: true})` will result in minified JavaScript.
+
+#### Transformer.engines
+
+  Returns an array of engines that can be used to power this transformer.  The first of these that's installed will be used for the transformation.
+
+  To enable a transformation just take `[engine] = Transformer.engines[0]` and then do `npm install [engine]`.  If `[engine]` is `.` there is no need to install an engine from npm to use the transformer.
+
+#### Transformer.render(str, options, cb)
+
+  Tranform the string `str` using the `Transformer` with the provided options and call the callback `cb(err, res)`.
+
+  If no `cb` is provided, this method returns a [promises/A+](http://promises-aplus.github.com/promises-spec/) promise.
+
+#### Transformer.renderSync(str, options)
+
+  Synchronous version of `Transformer.render`
+
+#### Transformer.renderFile(filename, options, cb)
+
+  Reads the file at filename into `str` and sets `options.filename = filename` then calls `Transform.render(str, options, cb)`.
+
+  If no `cb` is provided, this method returns a [promises/A+](http://promises-aplus.github.com/promises-spec/) promise.
+
+#### Tranformer.renderFileSync(filename, options)
+
+  Synchronous version of `Tranformer.renderFile`
+
+#### Transformer.outputFormat
+
+  A string, one of:
+
+   - `'xml'`
+   - `'css'`
+   - `'js'`
+   - `'json'`
+   - `'text'`
+
+Adding to this list will **not** result in a major version change, so you should handle unexpected types gracefully (I'd suggest default to assuming `'text'`).
+
+#### Transformer.sync
+
+  `true` if the transformer can be used syncronously, `false` otherwise.
+
+## Libraries that don't work synchronously
+
+  The following transformations will always throw an exception if you attempt to run them synchronously:
+
+   1. dust
+   2. qejs
+   3. html2jade
+
+The following transformations sometimes throw an exception if run syncronously, typically they only throw an exception if you are doing something like including another file.  If you are not doing the things that cause them to fail then they are consistently safe to use syncronously.
+
+   - jade (only when using `then-jade` instead of `jade`)
+   - less (when `@import` is used with a url instead of a filename)
+   - jazz (When one of the functions passed as locals is asyncronous)
+
+The following libraries look like they might sometimes throw exceptions when used syncronously (if you read the source) but they never actually do so:
+
+   - just
+   - ect
+   - stylus
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/history.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/history.md b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/history.md
new file mode 100644
index 0000000..f7ea66b
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/history.md
@@ -0,0 +1,77 @@
+## 2.1.0 - 2013-07-13
+
+ - **verbatim**
+ - **cdata-js**
+ - **cdata-css**
+ - fix escaping in **cdata**
+ - fix **less** errors
+
+## 2.0.1 - 2013-04-22
+
+ - Fix global leak of `exportscoffeeScript` (test still fails because `jade` requires an out of date version of `transformers`)
+
+## 2.0.0 - 2013-03-31
+
+ - Add `minify` support to all transformers
+ - Bundle minifiers in package
+
+## 1.8.3 - 2013-03-19
+
+ - Update promise dependency
+
+## 1.8.2 - 2013-02-10
+
+ - Support `sourceURLs` in **component**
+
+## 1.8.1 - 2013-02-10
+
+ - Add travis-ci
+ - FIX **toffee** support which was broken by their latest update
+ - FIX lookup paths for **component** weren't set so you couldn't build components with dependancies
+
+## 1.8.0 - 2013-01-30
+
+ - **highlight** (needs tests)
+
+## 1.7.0 - 2013-01-30
+
+ - **component-js**
+ - **component-css**
+ - **html2jade** - must be `v0.0.7` because of a bug in later versions
+ - Much more extensive tests
+
+## 1.6.0 - 2013-01-29
+
+ - **uglify-css**
+ - **uglify-json**
+ - Rename **uglify** to **uglify-js**
+
+## 1.5.0 - 2013-01-27
+
+ - **dot**
+
+## 1.4.0 - 2013-01-25
+
+ - Support sync `@import` statements in **less**
+ - Report real errors from **less** (rather than objects)
+
+## 1.3.0 - 2013-01-25
+
+ - **templayed**
+ - **plates**
+
+## 1.2.1 - 2013-01-09
+
+ - make **markdown** work when using **markdown** as the engine (**marked** is the recommended engine).
+
+## 1.2.0 - 2013-01-09
+
+ - **js** (pass through)
+ - **css** (pass through)
+ - rename **coffee-script** from **coffee** to **coffee-script** and add **coffee** as an alias
+
+## 1.1.0 - 2013-01-08
+
+ - **coffeecup**
+ - **cson**
+ - FIX: disabling **dust** cache
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/lib/shared.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/lib/shared.js b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/lib/shared.js
new file mode 100644
index 0000000..8663117
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/jade/node_modules/transformers/lib/shared.js
@@ -0,0 +1,162 @@
+var Promise = require('promise');
+var fs = require('fs');
+var path = require('path');
+var normalize = path.normalize;
+
+
+Promise.prototype.nodeify = function (cb) {
+  if (typeof cb === 'function') {
+    this.then(function (res) { process.nextTick(function () { cb(null, res); }); },
+              function (err) { process.nextTick(function () { cb(err); }); });
+    return undefined;
+  } else {
+    return this;
+  }
+}
+
+var minifiers = {};
+
+module.exports = Transformer;
+function Transformer(obj) {
+  this.name = obj.name;
+  this.engines = obj.engines;
+  this.isBinary = obj.isBinary || false;
+  this.isMinifier = obj.isMinifier || false;
+  this.outputFormat = obj.outputFormat;
+  this._cache = {};
+  if (typeof obj.async === 'function') {
+    this._renderAsync = obj.async;
+    this.sudoSync = obj.sudoSync || false;
+  }
+  if (typeof obj.sync === 'function') {
+    this._renderSync = obj.sync;
+    this.sync = true;
+  } else {
+    this.sync = obj.sudoSync || false;
+  }
+
+  if (this.isMinifier)
+    minifiers[this.outputFormat] = this;
+  else {
+    var minifier = minifiers[this.outputFormat];
+    if (minifier) {
+      this.minify = function(str, options) {
+        if (options && options.minify)
+          return minifier.renderSync(str, typeof options.minify === 'object' && options.minify || {});
+        return str;
+      }
+    }
+  }
+}
+
+Transformer.prototype.cache = function (options, data) {
+  if (options.cache && options.filename) {
+    if (data) return this.cache[options.filename] = data;
+    else return this.cache[options.filename];
+  } else {
+    return data;
+  }
+};
+Transformer.prototype.loadModule = function () {
+  if (this.engine) return this.engine;
+  for (var i = 0; i < this.engines.length; i++) {
+    try {
+      var res = this.engines[i] === '.' ? null : (this.engine = require(this.engines[i]));
+      this.engineName = this.engines[i];
+      return res;
+    } catch (ex) {
+      if (this.engines.length === 1) {
+        throw ex;
+      }
+    }
+  }
+  throw new Error('In order to apply the transform ' + this.name + ' you must install one of ' + this.engines.map(function (e) { return '"' + e + '"'; }).join());
+};
+Transformer.prototype.minify = function(str, options) {
+  return str;
+}
+Transformer.prototype.renderSync = function (str, options) {
+  options = options || {};
+  options = clone(options);
+  this.loadModule();
+  if (this._renderSync) {
+    return this.minify(this._renderSync((this.isBinary ? str : fixString(str)), options), options);
+  } else if (this.sudoSync) {
+    options.sudoSync = true;
+    var res, err;
+    this._renderAsync((this.isBinary ? str : fixString(str)), options, function (e, val) {
+      if (e) err = e;
+      else res = val;
+    });
+    if (err) throw err;
+    else if (res != undefined) return this.minify(res, options);
+    else if (typeof this.sudoSync === 'string') throw new Error(this.sudoSync.replace(/FILENAME/g, options.filename || ''));
+    else throw new Error('There was a problem transforming ' + (options.filename || '') + ' syncronously using ' + this.name);
+  } else {
+    throw new Error(this.name + ' does not support transforming syncronously.');
+  }
+};
+Transformer.prototype.render = function (str, options, cb) {
+  options = options || {};
+  var self = this;
+  return new Promise(function (resolve, reject) {
+    self.loadModule();
+    if (self._renderAsync) {
+      self._renderAsync((self.isBinary ? str : fixString(str)), clone(options), function (err, val) {
+        if (err) reject(err);
+        else resolve(self.minify(val, options));
+      })
+    } else {
+      resolve(self.renderSync(str, options));
+    }
+  })
+  .nodeify(cb);
+};
+Transformer.prototype.renderFile = function (path, options, cb) {
+  options = options || {};
+  var self = this;
+  return new Promise(function (resolve, reject) {
+    options.filename = (path = normalize(path));
+    if (self._cache[path])
+      resolve(null);
+    else
+      fs.readFile(path, function (err, data) {
+        if (err) reject(err);
+        else resolve(data);
+      })
+  })
+  .then(function (str) {
+    return self.render(str, options);
+  })
+  .nodeify(cb);
+};
+Transformer.prototype.renderFileSync = function (path, options) {
+  options = options || {};
+  options.filename = (path = normalize(path));
+  return this.renderSync((this._cache[path] ? null : fs.readFileSync(path)), options);
+};
+function fixString(str) {
+  if (str == null) return str;
+  //convert buffer to string
+  str = str.toString();
+  // Strip UTF-8 BOM if it exists
+  str = (0xFEFF == str.charCodeAt(0) 
+    ? str.substring(1)
+    : str);
+  //remove `\r` added by windows
+  return str.replace(/\r/g, '');
+}
+
+function clone(obj) {
+  if (Array.isArray(obj)) {
+    return obj.map(clone);
+  } else if (obj && typeof obj === 'object') {
+    var res = {};
+    for (var key in obj) {
+      res[key] = clone(obj[key]);
+    }
+    return res;
+  } else {
+    return obj;
+  }
+}


Mime
View raw message