Upgrade handlebars from 1.0.9 to 1.0.11.

There were some notable bug fixes between those versions.  We are
still far behind the current version (1.3.0).

For the node stuff, I used npm update.

Then for static/third/handlebars/handlebars.runtime.js, I copied
the node version then added back the copyright.

(imported from commit 59bcd2c52540ff88bba2f90cced809cfcb8cd92b)
This commit is contained in:
Steve Howell
2014-01-08 16:46:34 -05:00
committed by Waseem Daher
parent 2504baf783
commit 4c3d22baf5
31 changed files with 3202 additions and 2836 deletions

View File

@@ -1,4 +1,4 @@
language: node_js
node_js:
- 0.6
- 0.8
- "0.8"
- "0.10"

View File

@@ -31,7 +31,7 @@ function Argv (args, cwd) {
.join(' ')
;
if (process.argv[1] == process.env._) {
if (process.env._ != undefined && process.argv[1] == process.env._) {
self.$0 = process.env._.replace(
path.dirname(process.execPath) + '/', ''
);
@@ -328,7 +328,10 @@ function Argv (args, cwd) {
break;
}
else if (arg.match(/^--.+=/)) {
var m = arg.match(/^--([^=]+)=(.*)/);
// 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 (arg.match(/^--no-.+/)) {

View File

@@ -34,12 +34,11 @@
"email": "mail@substack.net",
"url": "http://substack.net"
},
"readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n",
"readmeFilename": "README.markdown",
"bugs": {
"url": "https://github.com/substack/node-wordwrap/issues"
},
"_id": "wordwrap@0.0.2",
"dependencies": {},
"optionalDependencies": {},
"_engineSupported": true,
"_npmVersion": "1.1.4",
"_nodeVersion": "v0.6.19",
"_defaultsLoaded": true,
"_from": "wordwrap@~0.0.2"
}

File diff suppressed because one or more lines are too long

View File

@@ -244,6 +244,19 @@ test('boolean groups', function (t) {
t.end();
});
test('newlines in params' , function (t) {
var args = optimist.parse([ '-s', "X\nX" ])
t.same(args, { _ : [], s : "X\nX", $0 : $0 });
// reproduce in bash:
// VALUE="new
// line"
// node program.js --s="$VALUE"
args = optimist.parse([ "--s=X\nX" ])
t.same(args, { _ : [], s : "X\nX", $0 : $0 });
t.end();
});
test('strings' , function (t) {
var s = optimist([ '-s', '0001234' ]).string('s').argv.s;
t.same(s, '0001234');

View File

@@ -1 +0,0 @@
console.dir(require('./').argv);

File diff suppressed because one or more lines are too long