Skip to content

Commit

Permalink
DEBUG: show contents of asset directory
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Jan 14, 2025
1 parent b94dc61 commit 7336cd3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions runtime/wasm/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,21 @@
);
const options = { builtins: ["js-string", "text-decoder", "text-encoder"] };

try {
const path = require("node:path");
const directoryPath =
path.join(path.dirname(require.main.filename), src)
const files = fs.readdirSync(directoryPath);

console.log(`Files in directory ${directoryPath}:`);
files.forEach(file => {
const fullPath = path.join(directoryPath, file);
console.log(file);
});
} catch (err) {
console.error(`Error reading directory: ${err}`);
}

function loadRelative(src) {
const path = require("node:path");
const f = path.join(path.dirname(require.main.filename), src);
Expand Down

0 comments on commit 7336cd3

Please sign in to comment.