@webref/elements
Advanced tools
Comparing version 1.0.2 to 1.0.4
const fs = require('fs').promises; | ||
const path = require('path'); | ||
async function listAll() { | ||
async function listAll({folder = __dirname} = {}) { | ||
const all = {}; | ||
const files = await fs.readdir(__dirname); | ||
const files = await fs.readdir(folder); | ||
for (const f of files) { | ||
if (f.endsWith('.json') && f !== 'package.json') { | ||
const text = await fs.readFile(path.join(__dirname, f), 'utf8'); | ||
const text = await fs.readFile(path.join(folder, f), 'utf8'); | ||
all[path.basename(f, '.json')] = JSON.parse(text); | ||
@@ -11,0 +11,0 @@ } |
{ | ||
"name": "@webref/elements", | ||
"description": "Markup elements of the Web platform and associated Web IDL interfaces", | ||
"version": "1.0.2", | ||
"version": "1.0.4", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
21376