Skip to content

Commit

Permalink
Bump version to 0.5.6, update 2012 to 2013.
Browse files Browse the repository at this point in the history
  • Loading branch information
justjohn committed Feb 17, 2013
1 parent 3a3a15f commit a5aabbb
Show file tree
Hide file tree
Showing 19 changed files with 306 additions and 267 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2012, John Roepke
Copyright (c) 2011-2013, John Roepke
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Expand Down
62 changes: 31 additions & 31 deletions demos/node_express/public/vendor/twig.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Twig.js 0.5.5
// Copyright (c) 2011-2012 John Roepke
// Twig.js 0.5.6
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

var Twig = (function (Twig) {

Twig.VERSION = "0.5.5";
Twig.VERSION = "0.5.6";

return Twig;
})(Twig || {});
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -1518,7 +1518,7 @@ var Twig = (function(Twig) {

})(Twig || { });
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -2317,7 +2317,7 @@ var Twig = (function (Twig) {

})(Twig || { });
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -3297,7 +3297,7 @@ var Twig = (function (Twig) {

})( Twig || { } );
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -3327,7 +3327,7 @@ var Twig = (function (Twig) {
token.precidence = 20;
token.associativity = Twig.expression.operator.leftToRight;
break;

case ',':
token.precidence = 18;
token.associativity = Twig.expression.operator.leftToRight;
Expand Down Expand Up @@ -3405,7 +3405,7 @@ var Twig = (function (Twig) {
case ':':
// Ignore
break;

case '?':
c = stack.pop(); // false expr
b = stack.pop(); // true expr
Expand All @@ -3416,7 +3416,7 @@ var Twig = (function (Twig) {
stack.push(c);
}
break;

case '+':
b = parseFloat(stack.pop());
a = parseFloat(stack.pop());
Expand Down Expand Up @@ -3537,28 +3537,28 @@ var Twig = (function (Twig) {
a = stack.pop();
stack.push( !containment(a, b) );
break;

case 'in':
b = stack.pop();
a = stack.pop();
stack.push( containment(a, b) );
break;

case '..':
b = stack.pop();
a = stack.pop();
stack.push( Twig.functions.range(a, b) );
break;

default:
throw new Twig.Error(operator + " is an unknown operator.");
}
};

var containment = function(a, b) {
if (b.indexOf != undefined) {
return b.indexOf(a) > -1;

} else {
var el;
for (el in b) {
Expand All @@ -3574,7 +3574,7 @@ var Twig = (function (Twig) {

})( Twig || { } );
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -3685,7 +3685,7 @@ var Twig = (function (Twig) {
if (value === undefined){
return;
}

return encodeURIComponent(value);
},
join: function(value, params) {
Expand Down Expand Up @@ -3841,7 +3841,7 @@ var Twig = (function (Twig) {
if (value === undefined){
return;
}

return Twig.lib.strip_tags(value);
},

Expand Down Expand Up @@ -3874,7 +3874,7 @@ var Twig = (function (Twig) {

/**
* Adapted from: http://phpjs.org/functions/number_format:481
*/
*/
number_format: function(value, params) {
var number = value,
decimals = (params && params[0]) ? params[0] : undefined,
Expand Down Expand Up @@ -3939,7 +3939,7 @@ var Twig = (function (Twig) {

})(Twig || { });
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// 2012 Hadrien Lanneau
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js
Expand All @@ -3957,7 +3957,7 @@ var Twig = (function (Twig) {

Twig.functions = {
// attribute, block, constant, date, dump, parent, random,.

// Range function from http://phpjs.org/functions/range:499
// Used under an MIT License
range: function (low, high, step) {
Expand Down Expand Up @@ -4110,7 +4110,7 @@ var Twig = (function (Twig) {

})(Twig || { });
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -4172,7 +4172,7 @@ var Twig = (function (Twig) {
return Twig;
})( Twig || { } );
// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down Expand Up @@ -4358,7 +4358,7 @@ var Twig = (function (Twig) {
}) (Twig || { });

// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand All @@ -4369,17 +4369,17 @@ var Twig = (function (Twig) {
/**
* Namespace for compilation.
*/
Twig.compiler = {
Twig.compiler = {
module: {}
};

// Compile a Twig Template to output.
Twig.compiler.compile = function(template, options) {
// Get tokens
var tokens = JSON.stringify(template.tokens)
, id = template.id
, output;

if (options.module) {
if (Twig.compiler.module[options.module] === undefined) {
throw new Twig.Error("Unable to find module type " + options.module);
Expand All @@ -4390,7 +4390,7 @@ var Twig = (function (Twig) {
}
return output;
};

Twig.compiler.module = {
amd: function(id, tokens, pathToTwig) {
return 'define(["' + pathToTwig + '"], function (Twig) {\n\tvar twig = Twig.twig;\n' + Twig.compiler.wrap(id, tokens) + '\n\treturn templates;\n});';
Expand All @@ -4406,14 +4406,14 @@ var Twig = (function (Twig) {
+ '\n});'
}
};

Twig.compiler.wrap = function(id, tokens) {
return 'twig({id:"'+id.replace('"', '\\"')+'", data:'+tokens+', precompiled: true});\n';
};

return Twig;
})(Twig || {});// Twig.js
// Copyright (c) 2011-2012 John Roepke
// Copyright (c) 2011-2013 John Roepke
// Available under the BSD 2-Clause License
// https://github.com/justjohn/twig.js

Expand Down
Loading

0 comments on commit a5aabbb

Please sign in to comment.