highmark-cli 0.0.261 → 0.0.263

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.
@@ -3,8 +3,8 @@
3
3
  const watchOperation = require("../operation/watch"),
4
4
  copyFontsOperation = require("../operation/copyFonts"),
5
5
  markdownHTMLOperation = require("../operation/markdownHTML"),
6
- copyClientHTMLOperation = require("../operation/copyClientHTML"),
7
6
  copyClientFilesOperation = require("../operation/copyClientFiles"),
7
+ createClientHTMLOperation = require("../operation/createClientHTML"),
8
8
  markdownStylesCSSOperation = require("../operation/markdownStylesCSS");
9
9
 
10
10
  const { executeOperations } = require("../utilities/operation"),
@@ -14,8 +14,8 @@ function publishAction(port, watch, quietly, copyFonts, inputFileName, copyClien
14
14
  const operations = [
15
15
  markdownHTMLOperation,
16
16
  markdownStylesCSSOperation,
17
+ createClientHTMLOperation,
17
18
  copyClientFilesOperation,
18
- copyClientHTMLOperation,
19
19
  copyFontsOperation,
20
20
  watchOperation
21
21
  ],
package/bin/importer.js CHANGED
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ const { pathUtilities } = require("necessary");
4
+
3
5
  const { readFile } = require("./utilities/fileSystem"),
4
6
  { classNameFromFilePath } = require("./utilities/division"),
5
7
  { nodeFromTokens, tokensFromContent } = require("./utilities/markdown");
6
8
 
9
+ const { concatenatePaths } = pathUtilities;
10
+
7
11
  function importer(filePath, context) {
12
+ const { projectDirectoryName } = context;
13
+
14
+ filePath = concatenatePaths(projectDirectoryName, filePath); ///
15
+
8
16
  const content = readFile(filePath);
9
17
 
10
18
  if (content !== null) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const { copyFiles: copyClientFilesAsync } = require("highmark-client");
3
+ const { copyFiles } = require("highmark-client");
4
4
 
5
5
  function copyClientFilesOperation(proceed, abort, context) {
6
6
  const { copyClientFiles } = context;
@@ -9,7 +9,7 @@ function copyClientFilesOperation(proceed, abort, context) {
9
9
  const { projectDirectoryName } = context,
10
10
  targetDirectoryPath = projectDirectoryName; ///
11
11
 
12
- copyClientFilesAsync(targetDirectoryPath);
12
+ copyFiles(targetDirectoryPath);
13
13
  }
14
14
 
15
15
  proceed();
@@ -1,13 +1,20 @@
1
1
  "use strict";
2
2
 
3
- const { createHTML: createClientHTML } = require("highmark-client");
3
+ const { pathUtilities } = require("necessary"),
4
+ { constants, createHTML } = require("highmark-client");
5
+
6
+ const { writeFile } = require("../utilities/fileSystem");
7
+
8
+ const { concatenatePaths } = pathUtilities,
9
+ { INDEX_HTML_FILE_NAME } = constants;
4
10
 
5
11
  function createClientHTMLOperation(proceed, abort, context) {
6
12
  const { markdownHTML, markdownStylesCSS, projectDirectoryName } = context,
7
- targetDirectoryPath = projectDirectoryName, ///
8
- noClient = true;
13
+ html = createHTML(markdownHTML, markdownStylesCSS),
14
+ content = html, ///
15
+ filePath = concatenatePaths(projectDirectoryName, INDEX_HTML_FILE_NAME);
9
16
 
10
- createClientHTML(markdownHTML, markdownStylesCSS, targetDirectoryPath, noClient);
17
+ writeFile(filePath, content);
11
18
 
12
19
  proceed();
13
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "highmark-cli",
3
3
  "author": "James Smith",
4
- "version": "0.0.261",
4
+ "version": "0.0.263",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/highmark-cli",
7
7
  "description": "Highmark's LIC tool.",