2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Files
Nikolay Kostyurin 8b0ceae591 v2.3.1
2019-03-04 02:52:37 +02:00

14 lines
444 B
JavaScript
Vendored

const fs = require('fs');
const path = require('path');
const parse = require('../../packages/bbob-parser/lib/index').parse;
const render = require('../../packages/bbob-html/lib/index').render;
const data = fs.readFileSync(path.resolve('./yahoo.html'));
console.time('parse html');
const ast = parse(data, { openTag: '<', closeTag: '>' });
console.timeEnd('parse html');
fs.writeFileSync(path.resolve('./yahoo.json'), JSON.stringify(ast));