hdoc-tools 0.60.1 → 0.62.0
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/LICENSE +21 -21
- package/README.md +89 -75
- package/hdoc-build-db.js +275 -275
- package/hdoc-build-embeddings.js +202 -202
- package/hdoc-build-pdf.js +232 -232
- package/hdoc-build.js +14 -6
- package/hdoc-bump.js +4 -2
- package/hdoc-content-routes.js +143 -83
- package/hdoc-create.js +110 -108
- package/hdoc-db.js +114 -114
- package/hdoc-help.js +60 -60
- package/hdoc-init.js +103 -68
- package/hdoc-install-browser.js +145 -145
- package/hdoc-mermaid.js +204 -204
- package/hdoc-module.js +1102 -1079
- package/hdoc-serve.js +13 -7
- package/hdoc-stats.js +9 -9
- package/hdoc-validate-config.js +355 -329
- package/hdoc-validate-interbook.js +321 -0
- package/hdoc-validate.js +1231 -1158
- package/hdoc-ver.js +4 -2
- package/hdoc.js +12 -11
- package/npm-shrinkwrap.json +2 -2
- package/package.json +13 -2
- package/schemas/hdocbook-project.schema.json +20 -0
- package/schemas/hdocbook.schema.json +6 -2
- package/templates/doc-header-non-git.html +19 -19
- package/templates/doc-header.html +26 -26
- package/templates/init/.github/workflows/hdocbuild_onpull.yml +16 -16
- package/templates/init/.github/workflows/hdocbuild_onpush.yml +15 -15
- package/templates/init/LICENSE +21 -21
- package/templates/init/README.md +9 -9
- package/templates/init/_hdocbook/index.md +4 -4
- package/templates/init/gitignore +8 -8
- package/templates/init/resources/README.md +2 -2
- package/templates/pdf/css/custom-block.css +90 -90
- package/templates/pdf/css/fonts.css +221 -221
- package/templates/pdf/css/hdocs-pdf.css +495 -495
- package/templates/pdf/css/vars.css +404 -404
- package/templates/pdf/template-footer.html +19 -19
- package/templates/pdf/template-header.html +37 -37
- package/templates/pdf/template.html +20 -20
- package/templates/pdf-header-non-git.html +12 -12
- package/templates/pdf-header.html +16 -16
- package/ui/content/invalid-hdocbook-json.html +6 -6
- package/ui/content/invalid-hdocbook-json.md +7 -7
- package/ui/css/theme-default/styles/components/content.css +124 -124
- package/ui/css/theme-default/styles/components/sidebar.css +182 -182
- package/ui/css/theme-default/styles/htldoc.layouts.css +310 -310
- package/ui/index.html +419 -419
- package/ui/js/doc.hornbill.js +31 -44
- package/ui/js/mermaid-theme.json +27 -0
- package/hdoc-build-onyx.js +0 -134
- package/templates/mermaid-theme.yaml +0 -28
- package/templates/pdf/fonts/inter-cyrillic copy.woff2 +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Hornbill Docs
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Hornbill Docs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,75 +1,89 @@
|
|
|
1
|
-
# hdoc-tools
|
|
2
|
-
|
|
3
|
-
Hornbill HDocBook Development Support Tool.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
<code>hdoc argument switches</code>
|
|
8
|
-
|
|
9
|
-
## Arguments
|
|
10
|
-
|
|
11
|
-
The arguments available to this command-line tool are as follows.
|
|
12
|
-
|
|
13
|
-
### help
|
|
14
|
-
|
|
15
|
-
Outputs available arguments and switches.
|
|
16
|
-
|
|
17
|
-
### init
|
|
18
|
-
|
|
19
|
-
Initializes a new HDocBook project from a template, using runtime input variables.
|
|
20
|
-
|
|
21
|
-
### createDocs
|
|
22
|
-
|
|
23
|
-
Creates folder structure and markdown documents as defined in the HDocBook navigation item links
|
|
24
|
-
|
|
25
|
-
### stats
|
|
26
|
-
|
|
27
|
-
Returns statistics regarding the book you are working on:
|
|
28
|
-
|
|
29
|
-
- Document ID
|
|
30
|
-
- Version
|
|
31
|
-
- Title
|
|
32
|
-
- Description
|
|
33
|
-
- Public Source
|
|
34
|
-
- Total Book Word Count
|
|
35
|
-
- Number of Markdown Files in the Book
|
|
36
|
-
- Number of Static HTML Files in the Book
|
|
37
|
-
|
|
38
|
-
If the `-v` switch is provided, then more verbose output is output, which includes a list of each MD and HTML file found, the file sizes, and file-specific word count.
|
|
39
|
-
|
|
40
|
-
The book statistics do not include counts for any externally hosted content injected into the book content using the [[INCLUDE]] tags.
|
|
41
|
-
|
|
42
|
-
### build
|
|
43
|
-
|
|
44
|
-
Performs a local build of the book, validates the links and static content are present and correct and outputs as a ZIP file.
|
|
45
|
-
|
|
46
|
-
If the `-v` switch is provided, then a more verbose output is provided, which includes a list of all HTML files created and checked for embedded links and static content.
|
|
47
|
-
|
|
48
|
-
Use the `--set-version` argument to set the version number of the built book.
|
|
49
|
-
|
|
50
|
-
Use the `--no-color` argument to remove any color control characters from the output.
|
|
51
|
-
|
|
52
|
-
Use the `--no-links` argument to skip link output to CLI during validation.
|
|
53
|
-
|
|
54
|
-
### validate
|
|
55
|
-
|
|
56
|
-
Performs a minimum local build of the book, then validates the links and static content are present and correct.
|
|
57
|
-
|
|
58
|
-
If the `-v` switch is provided, then a more verbose output is provided, which includes a list of all HTML files created and checked for embedded links and static content.
|
|
59
|
-
|
|
60
|
-
Use the `--set-version` argument to set the version number of the built book.
|
|
61
|
-
|
|
62
|
-
Use the `--no-color` argument to remove any color control characters from the output.
|
|
63
|
-
|
|
64
|
-
Use the `--no-links` argument to skip link output to CLI during validation.
|
|
65
|
-
|
|
66
|
-
### serve
|
|
67
|
-
|
|
68
|
-
Starts a local web server on port 3000, serving the book content.
|
|
69
|
-
|
|
70
|
-
To preview the documentation in a browser, you can open a terminal window and run the dev preview server with the
|
|
71
|
-
command `hdoc serve` and in a local browser go to the URL `http://localhost:3000`
|
|
72
|
-
|
|
73
|
-
## Installation
|
|
74
|
-
|
|
75
|
-
> `npm install hdoc-tools -g`
|
|
1
|
+
# hdoc-tools
|
|
2
|
+
|
|
3
|
+
Hornbill HDocBook Development Support Tool.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
<code>hdoc argument switches</code>
|
|
8
|
+
|
|
9
|
+
## Arguments
|
|
10
|
+
|
|
11
|
+
The arguments available to this command-line tool are as follows.
|
|
12
|
+
|
|
13
|
+
### help
|
|
14
|
+
|
|
15
|
+
Outputs available arguments and switches.
|
|
16
|
+
|
|
17
|
+
### init
|
|
18
|
+
|
|
19
|
+
Initializes a new HDocBook project from a template, using runtime input variables.
|
|
20
|
+
|
|
21
|
+
### createDocs
|
|
22
|
+
|
|
23
|
+
Creates folder structure and markdown documents as defined in the HDocBook navigation item links
|
|
24
|
+
|
|
25
|
+
### stats
|
|
26
|
+
|
|
27
|
+
Returns statistics regarding the book you are working on:
|
|
28
|
+
|
|
29
|
+
- Document ID
|
|
30
|
+
- Version
|
|
31
|
+
- Title
|
|
32
|
+
- Description
|
|
33
|
+
- Public Source
|
|
34
|
+
- Total Book Word Count
|
|
35
|
+
- Number of Markdown Files in the Book
|
|
36
|
+
- Number of Static HTML Files in the Book
|
|
37
|
+
|
|
38
|
+
If the `-v` switch is provided, then more verbose output is output, which includes a list of each MD and HTML file found, the file sizes, and file-specific word count.
|
|
39
|
+
|
|
40
|
+
The book statistics do not include counts for any externally hosted content injected into the book content using the [[INCLUDE]] tags.
|
|
41
|
+
|
|
42
|
+
### build
|
|
43
|
+
|
|
44
|
+
Performs a local build of the book, validates the links and static content are present and correct and outputs as a ZIP file.
|
|
45
|
+
|
|
46
|
+
If the `-v` switch is provided, then a more verbose output is provided, which includes a list of all HTML files created and checked for embedded links and static content.
|
|
47
|
+
|
|
48
|
+
Use the `--set-version` argument to set the version number of the built book.
|
|
49
|
+
|
|
50
|
+
Use the `--no-color` argument to remove any color control characters from the output.
|
|
51
|
+
|
|
52
|
+
Use the `--no-links` argument to skip link output to CLI during validation.
|
|
53
|
+
|
|
54
|
+
### validate
|
|
55
|
+
|
|
56
|
+
Performs a minimum local build of the book, then validates the links and static content are present and correct.
|
|
57
|
+
|
|
58
|
+
If the `-v` switch is provided, then a more verbose output is provided, which includes a list of all HTML files created and checked for embedded links and static content.
|
|
59
|
+
|
|
60
|
+
Use the `--set-version` argument to set the version number of the built book.
|
|
61
|
+
|
|
62
|
+
Use the `--no-color` argument to remove any color control characters from the output.
|
|
63
|
+
|
|
64
|
+
Use the `--no-links` argument to skip link output to CLI during validation.
|
|
65
|
+
|
|
66
|
+
### serve
|
|
67
|
+
|
|
68
|
+
Starts a local web server on port 3000, serving the book content.
|
|
69
|
+
|
|
70
|
+
To preview the documentation in a browser, you can open a terminal window and run the dev preview server with the
|
|
71
|
+
command `hdoc serve` and in a local browser go to the URL `http://localhost:3000`
|
|
72
|
+
|
|
73
|
+
## Installation
|
|
74
|
+
|
|
75
|
+
> `npm install hdoc-tools -g`
|
|
76
|
+
|
|
77
|
+
## Releasing
|
|
78
|
+
|
|
79
|
+
Releases are fully automated via GitHub Actions ([.github/workflows/release.yml](.github/workflows/release.yml)):
|
|
80
|
+
|
|
81
|
+
1. Add a `## [X.Y.Z]` section for the new version at the top of [CHANGELOG.md](CHANGELOG.md).
|
|
82
|
+
2. Bump `version` in [package.json](package.json) to match.
|
|
83
|
+
3. Push (or merge) to `main`.
|
|
84
|
+
|
|
85
|
+
The workflow detects the new version (no `vX.Y.Z` tag yet), publishes to npm using
|
|
86
|
+
trusted publishing (OIDC — no npm tokens), creates the git tag and GitHub Release with
|
|
87
|
+
the changelog section as notes, and announces the release in the Hornbill workspace.
|
|
88
|
+
Pushes to `main` without a version bump do nothing. Re-running a failed workflow is
|
|
89
|
+
safe — each step is guarded by what already exists on npm and in tags.
|