@asciidoctor/core 2.2.6 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{README.md → README.adoc} +17 -16
- package/dist/browser/asciidoctor.js +23210 -22518
- package/dist/browser/asciidoctor.min.js +1446 -1472
- package/dist/css/asciidoctor.css +2 -2
- package/dist/graalvm/asciidoctor.js +22690 -21980
- package/dist/node/asciidoctor.js +9935 -13973
- package/package.json +59 -42
- package/types/index.d.ts +3006 -2901
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
= Asciidoctor core
|
|
2
2
|
|
|
3
3
|
This package provides Asciidoctor core functionality:
|
|
4
4
|
|
|
@@ -6,27 +6,27 @@ This package provides Asciidoctor core functionality:
|
|
|
6
6
|
- built-in converters
|
|
7
7
|
- extensions
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
== Install
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
$ npm i @asciidoctor/core --save
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
== Usage
|
|
14
14
|
|
|
15
15
|
Here is a simple example that converts AsciiDoc to HTML5:
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
.sample.js
|
|
18
|
+
[source,javascript]
|
|
19
|
+
----
|
|
20
20
|
const asciidoctor = require('@asciidoctor/core')() // <1>
|
|
21
21
|
const content = 'http://asciidoctor.org[*Asciidoctor*] ' +
|
|
22
22
|
'running on https://opalrb.com[_Opal_] ' +
|
|
23
23
|
'brings AsciiDoc to Node.js!'
|
|
24
24
|
const html = asciidoctor.convert(content) // <2>
|
|
25
25
|
console.log(html) // <3>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
----
|
|
27
|
+
<1> Instantiate the Asciidoctor.js library
|
|
28
|
+
<2> Convert AsciiDoc content to HTML5 using Asciidoctor.js
|
|
29
|
+
<3> Print the HTML5 output to the console
|
|
30
30
|
|
|
31
31
|
Save the file as _sample.js_ and run it using the `node` command:
|
|
32
32
|
|
|
@@ -34,14 +34,15 @@ Save the file as _sample.js_ and run it using the `node` command:
|
|
|
34
34
|
|
|
35
35
|
You should see the following output in your terminal:
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
[source,html]
|
|
38
|
+
----
|
|
38
39
|
<div class="paragraph">
|
|
39
40
|
<p><a href="http://asciidoctor.org"><strong>Asciidoctor</strong></a> running on <a href="http://opalrb.com"><em>Opal</em></a> brings AsciiDoc to Node.js!</p>
|
|
40
41
|
</div>
|
|
41
|
-
|
|
42
|
+
----
|
|
42
43
|
|
|
43
|
-
If you want to know more about Asciidoctor.js, please read the
|
|
44
|
+
If you want to know more about Asciidoctor.js, please read the https://asciidoctor-docs.netlify.com/asciidoctor.js/[User Manual].
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
== Changelog
|
|
46
47
|
|
|
47
|
-
Refer to the
|
|
48
|
+
Refer to the https://github.com/asciidoctor/asciidoctor.js/blob/main/CHANGELOG.adoc[CHANGELOG] for a complete list of changes.
|