UNPKG

html-to-json-converter

Version:

Converts html contents to json object. Compile html files and wrap it all in a single json file.

22 lines (17 loc) 427 B
const htmlToJson = require('../index'); let service = new htmlToJson({ src: './**/*.tpl', dest: './demo/output/', options: { as_variable: true, with_version: true, include_paths: false //'./demo/templates/partial' } }); // generate output file service.compile(); // return content as promise let promise = service.yield(); promise.then((response) => { console.log(response); });