hdoc-tools 0.7.14 → 0.7.16

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 CHANGED
@@ -1,9 +1,51 @@
1
- # HDocBook documentation
2
- This is an example of a simple static content documentation project that is compatible with the Hornbill Docs system
1
+ # hdoc-tools
3
2
 
4
- Make sure that you have installed hdoc-tools
3
+ Hornbill HDocBook Development Support Tool.
5
4
 
6
- npm install hdoc-tools -g
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
+ ### stats
22
+
23
+ Returns statistics regarding the book you are working on:
24
+
25
+ - Document ID
26
+ - Version
27
+ - Title
28
+ - Description
29
+ - Public Source
30
+ - Total Book Word Count
31
+ - Number of Markdown Files in the Book
32
+ - Number of Static HTML Files in the Book
33
+
34
+ If the -v switch is provided, then a more verbose output is output, which includes a list of each MD and HTML file found, the file sizes, and file-specific word count.
35
+
36
+ ### build
37
+
38
+ Performs a local build of the book, validates the links and static content are present and correct, and outputs as a ZIP file.
39
+
40
+ 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.
41
+
42
+ ### serve
43
+
44
+ Starts a local web server on port 3000, serving the book content.
7
45
 
8
46
  To preview the documentation in a browser, you can open a terminal window and run the dev preview server with the
9
47
  command `hdoc serve` and in a local browser go to the url `http://localhost:3000`
48
+
49
+ ## Installation
50
+
51
+ npm install hdoc-tools -g
package/hdoc-build.js CHANGED
@@ -123,7 +123,7 @@
123
123
  console.log(` Failed to convert: ${conversion_failed}`);
124
124
 
125
125
  console.log(`\r\nValidating paths in generated HTML files`);
126
- const validation_success = validate.run(work_path, verbose);
126
+ const validation_success = validate.run(work_path, docId, verbose);
127
127
  if (!validation_success) {
128
128
  process.exit(1);
129
129
  }
package/hdoc-validate.js CHANGED
@@ -90,7 +90,7 @@ const parseLinkDestination = require('markdown-it/lib/helpers/parse_link_destina
90
90
  };
91
91
 
92
92
 
93
- exports.run = function (source_path, verbose) {
93
+ exports.run = function (source_path, doc_id, verbose) {
94
94
  // Get a list of HTML files in source_path
95
95
  dree.scan(source_path, dreeOptions, fileCallback);
96
96
 
@@ -116,7 +116,7 @@ const parseLinkDestination = require('markdown-it/lib/helpers/parse_link_destina
116
116
  }
117
117
  try {
118
118
  // Write list
119
- const listFile = path.join(source_path, 'list.txt');
119
+ const listFile = path.join(source_path, doc_id, 'list.txt');
120
120
  fs.writeFileSync(listFile, listContent);
121
121
  console.log(`${listFile} created successfully`);
122
122
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.7.14",
3
+ "version": "0.7.16",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {