Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Latest commit

 

History

History

nodejs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

The NodeJS binding of the Gutenberg post parser

The NodeJS binding relies on the Neon project.

Installation

Please, see the README.md of the project, but basically, it reduces to:

$ just build-nodejs

Usage example:

const gutenberg_post_parser = require('bindings/nodejs/native');

console.log(
    gutenberg_post_parser.root('<!-- wp:foo /-->')
);

Execute from NodeJS

The ./bin/gutenberg-post-parser executable is a NodeJS script using the NodeJS native module to parse a Gutenberg post and to emit either JSON or debug data.

$ ./bin/gutenberg-post-parser --emit-json ../../tests/fixtures/autoclosing-block.html