0.2.7 • Published 1 month ago

@oxide/react-asciidoc v0.2.7

Weekly downloads
-
License
MPL 2.0
Repository
github
Last release
1 month ago

React AsciiDoc

Warning Work in progress, not ready for use

A React renderer for AsciiDoc. Built on top of Asciidoctor.js. Designed to be equivalent in output of the built-in HTML5 converter. Will allow for custom components to be passed in similar to Custom converters in Asciidoctor.js and custom block types.

Currently just a proof of concept, working towards style parity with the built-in converter.

Installing

To view any of the examples first install all necessary modules:

npm install

Previewing

You can then preview any of the examples by running npm run dev and visting http://localhost:8000/?example=[EXAMPLE]&renderer=[RENDERER]. See here for the example names. Use renderer=react for the React renderer and renderer=html for the HTML one.

Note The example name must be identical to the file name without the file ending, it is case sensitive

Running tests

Before running the full set of tests we must first generate the screenshots. The tests are running a visual diff on the original renderer and the React one. You must therefore run the following command first:

npm run test:init

This will produce an error on first run; this is expected, as it needs to generate the screenshots. You should then run the following command, which runs all of the React renderer tests, comparing them to the baseline.

npm run test:run

GIF of the visual diff tests

Limitations

We do not have access to the inline nodes. They can be customised but not with React. You can write a standard asciidoctor.js custom converter instead. Using a JSX to string converter is planned to make it easier to create converters for inline nodes.

Current Progress

Tests are showing the following examples are identical to the HTML5 renderer using the default asciidoctor stylesheet.

  • Audio
  • Admonition
  • CoList
  • DList
  • Example
  • Floating Title
  • Inline Anchor
  • Inline Break
  • Inline Button
  • Inline Callout
  • Inline Image
  • Inline KBD
  • Inline Menu
  • Inline Quoteed
  • Listing
  • Literal
  • OList
  • Open
  • Page Break
  • Paragraph
  • Pass
  • Preamble
  • Quote
  • Sidebar
  • Thematic Break
  • Toc
  • Document
  • Embedded
  • Image
  • Inline Footnote
  • Outline
  • Section
  • Stem
  • Table
  • Video
0.2.7

1 month ago

0.2.6

1 month ago

0.2.5

1 month ago

0.2.4

1 month ago

0.2.3-alpha.2

2 months ago

0.2.3-alpha.1

2 months ago

0.2.3

2 months ago

0.2.2

2 months ago

0.2.1-alpha.1

6 months ago

0.1.3-alpha.5

6 months ago

0.1.3-alpha.6

6 months ago

0.1.3-alpha.7

6 months ago

0.1.3-alpha.8

6 months ago

0.1.3-alpha.9

6 months ago

0.1.2-alpha.6

7 months ago

0.1.0

10 months ago

0.2.1

6 months ago

0.1.2

7 months ago

0.2.0

6 months ago

0.1.1

9 months ago

0.1.2-alpha.3

7 months ago

0.1.2-alpha.2

7 months ago

0.1.2-alpha.5

7 months ago

0.1.2-alpha.4

7 months ago

0.1.3-alpha.1

6 months ago

0.1.3-alpha.2

6 months ago

0.1.3-alpha.3

6 months ago

0.1.2-alpha.1

7 months ago

0.1.3-alpha.4

6 months ago

0.0.1-alpha.21

12 months ago

0.0.1-alpha.20

1 year ago

0.0.1-alpha.19

1 year ago

0.0.1-alpha.18

1 year ago

0.0.1-alpha.17

1 year ago

0.0.1-alpha.16

1 year ago

0.0.1-alpha.15

1 year ago

0.0.1-alpha.14

1 year ago

0.0.1-alpha.13

1 year ago

0.0.1-alpha.12

1 year ago

0.0.1-alpha.11

1 year ago

0.0.1-alpha.10

1 year ago

0.0.1-alpha.9

1 year ago

0.0.1-alpha.8

1 year ago

0.0.1-alpha.7

1 year ago

0.0.1-alpha.6

1 year ago

0.0.1-alpha.5

1 year ago

0.0.1-alpha.4

1 year ago

0.0.1-alpha.3

1 year ago

0.0.1-alpha.2

1 year ago

0.0.1-alpha.1

1 year ago