Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "xsalt", | ||
"version": "0.0.4", | ||
"description": "Salty templates", | ||
"version": "0.0.5", | ||
"description": "A different kind of template engine", | ||
"main": "xsalt.js", | ||
@@ -6,0 +6,0 @@ "author": "Ross Paskett", |
44
test.js
@@ -18,12 +18,12 @@ console.log("\n"); | ||
var users = { | ||
users: [ | ||
{ username: 'ross', type: 1 }, | ||
{ username: 'steve', type: 1 }, | ||
{ username: 'bob', type: 2 }, | ||
{ username: 'dan', type: 1 }, | ||
{ username: 'trudy', type: 2 }, | ||
{ username: 'lucy', type: 1 } | ||
] | ||
}; | ||
// var data = { | ||
// users: [ | ||
// { username: 'ross', type: 1 }, | ||
// { username: 'steve', type: 1 }, | ||
// { username: 'bob', type: 2 }, | ||
// { username: 'dan', type: 1 }, | ||
// { username: 'trudy', type: 2 }, | ||
// { username: 'lucy', type: 1 } | ||
// ] | ||
// }; | ||
@@ -40,18 +40,16 @@ | ||
var stuff = [ | ||
{ text: "Bandolier", value: 5 }, | ||
{ text: "Snow shoes", value: 1 }, | ||
{ text: "Buck Mark", value: 2 }, | ||
{ text: "Walden", value: 3 }, | ||
{ text: "PS4", value: 4 } | ||
]; | ||
// var consoles = [ | ||
// { text: "PS4", value: 1 }, | ||
// { text: "XBOX One", value: 2 }, | ||
// { text: "Wii U", value: 3 } | ||
// ]; | ||
var options = xsalt('<xs:option each="." html="text" val="value">'); | ||
// var options = xsalt('<xs:option each="." html="text" val="value">'); | ||
console.log(options.compile(stuff)); | ||
// console.log(options.compile(consoles)); | ||
// var form = xsalt('<form method="POST" action="process.php">' | ||
// + '<xs:input each="users" type="text" val="username" name="username[]">'); | ||
// var form = xsalt('<ul class="items users">' | ||
// + '<xs:li each="users" html="username" data-action="some action">'); | ||
// console.log(form.compile(users, function(node, data) { | ||
// console.log(form.compile(data, function(node, data) { | ||
// if( data.type == 2 ) { | ||
@@ -63,4 +61,4 @@ // node.className += "edit"; | ||
// console.log(xsalt('<form method="POST" action="process.php"><xs:input type="text" each="food.vegetables" val="name" name="folder">').compile(data)); | ||
console.log(xsalt('<form method="POST" action="process.php"><xs:input type="text" each="food.vegetables" val="name" name="folder">').compile(data)); | ||
console.log("\n") |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39790
6
77
0
190