better demo

This commit is contained in:
Joao Moreno
2019-07-23 11:09:24 +02:00
parent 933eab7a08
commit 0d8e3ab19e
2 changed files with 11 additions and 7 deletions

View File

@@ -7,11 +7,11 @@ const path = require('path');
const fs = require('fs');
function collect(location) {
const element = path.basename(location);
const element = { name: path.basename(location) };
const stat = fs.statSync(location);
if (!stat.isDirectory()) {
return { element };
return { element, incompressible: true };
}
const children = fs.readdirSync(location)