1just a simple script for javascript shell
2const fs = require('fs');
3
4function buildTree(startPath) {
5 fs.readdir(startPath, (err, entries) => {
6 console.log(entries);
7 });
8}
9
10buildTree('/home/jim/Desktop/theme');
11
12for extra info visit below link
13https://www.sitepoint.com/shell-scripts-javascript/