summaryrefslogtreecommitdiff
path: root/librejs.mjs
blob: efd3ad769d14c520f48656e35b9943807b060c90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as fs from "node:fs/promises";

fs.readdir(".output/public/_nuxt").then((files) => {
	fs.open(".output/public/javascript.html", "w").then(async (fp) => {
		fp.write(`<table id="jslicense-labels1">\n`);
		for (let file of files) {
			if (/mjs/.test(file)) {
				await fp.write(
					`\t<tr>\n\t\t<td><a href="/_nuxt/${file}">${file}</a></td>\n\t\t<td><a href="http://www.gnu.org/licenses/gpl-3.0.html">GNU-GPL-3.0-or-later</a></td>\n\t\t<td><a href="/_nuxt/${file}">${file}</a></td>\n\t</tr>\n`
				);
			}
		}
		fp.write(`</table>\n`);
	});
});