mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-14 18:42:24 +03:00
v2.3.1
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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));
|
||||
Reference in New Issue
Block a user