tools/props.html: output complete JSON

This commit is contained in:
Mihai Bazon
2015-03-19 10:10:01 +02:00
parent 03b6121194
commit bb010c2253

View File

@@ -42,9 +42,13 @@
ta.style.width = "100%";
ta.style.height = "20em";
ta.style.boxSizing = "border-box";
ta.value = Object.keys(props).sort(cmp).map(function(name){
return JSON.stringify(name);
}).join(",\n");
<!-- ta.value = Object.keys(props).sort(cmp).map(function(name){ -->
<!-- return JSON.stringify(name); -->
<!-- }).join(",\n"); -->
ta.value = JSON.stringify({
vars: [],
props: Object.keys(props).sort(cmp)
}, null, 2);
document.body.appendChild(ta);
function cmp(a, b) {