highmark-cli 0.0.115 → 0.0.116

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.
@@ -8,29 +8,39 @@ const { classNameFromFilePath } = require("../utilities/division"),
8
8
  { DEFAULT_SELECTOR_STRING } = require("../constants"),
9
9
  { directoryPathFromFilePath } = require("../utilities/path");
10
10
 
11
- const { isFilePathMarkdownStyleFilePath } = filePathUtilities,
12
- { cssFromMarkdownStyleAndSelectorString } = cssUtilities;
11
+ const { cssFromMarkdownStyleAndSelectorString } = cssUtilities,
12
+ { isFilePathMarkdownStyleFilePath, isFilePathDefaultMarkdownStyleFilePath } = filePathUtilities;
13
13
 
14
14
  function markdownStylesCSSOperation(proceed, abort, context) {
15
15
  const { inputFilePath } = context,
16
- defaultCSS = cssFromMarkdownStyleAndSelectorString(defaultMarkdownStyle, DEFAULT_SELECTOR_STRING),
17
- inputDirectoryPath = directoryPathFromFilePath(inputFilePath);
18
-
19
- let markdownStylesCSS = defaultCSS; ///
16
+ inputDirectoryPath = directoryPathFromFilePath(inputFilePath),
17
+ markdownStyleFilePaths = [];
20
18
 
21
19
  readDirectory(inputDirectoryPath, (filePath) => {
22
20
  const filePathMarkdownStyleFilePath = isFilePathMarkdownStyleFilePath(filePath);
23
21
 
24
22
  if (filePathMarkdownStyleFilePath) {
25
- const markdownStyleFilePath = filePath, ///
26
- selectorString = selectorStringFromMarkdownStyleFilePath(markdownStyleFilePath),
27
- markdownStyle = markdownStyleFromMarkdownStyleFilePath(markdownStyleFilePath),
28
- css = cssFromMarkdownStyleAndSelectorString(markdownStyle, selectorString, markdownStylesCSS); ///
23
+ const markdownStyleFilePath = filePath,
24
+ filePathDefaultMarkdownStyleFilePath = isFilePathDefaultMarkdownStyleFilePath(filePath);
29
25
 
30
- markdownStylesCSS = `${markdownStylesCSS}${css}`;
26
+ filePathDefaultMarkdownStyleFilePath ?
27
+ markdownStyleFilePaths.unshift(markdownStyleFilePath) :
28
+ markdownStyleFilePaths.push(markdownStyleFilePath);
31
29
  }
32
30
  });
33
31
 
32
+ const defaultCSS = cssFromMarkdownStyleAndSelectorString(defaultMarkdownStyle, DEFAULT_SELECTOR_STRING);
33
+
34
+ let markdownStylesCSS = defaultCSS; ///
35
+
36
+ markdownStyleFilePaths.forEach((markdownStyleFilePath) => {
37
+ const selectorString = selectorStringFromMarkdownStyleFilePath(markdownStyleFilePath),
38
+ markdownStyle = markdownStyleFromMarkdownStyleFilePath(markdownStyleFilePath),
39
+ css = cssFromMarkdownStyleAndSelectorString(markdownStyle, selectorString, markdownStylesCSS); ///
40
+
41
+ markdownStylesCSS = `${markdownStylesCSS}${css}`;
42
+ });
43
+
34
44
  Object.assign(context, {
35
45
  markdownStylesCSS
36
46
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "highmark-cli",
3
3
  "author": "James Smith",
4
- "version": "0.0.115",
4
+ "version": "0.0.116",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/highmark-cli",
7
7
  "description": "Extensible, styleable Markdown.",
@@ -13,8 +13,8 @@
13
13
  "argumentative": "^2.0.28",
14
14
  "express": "^4.19.2",
15
15
  "highmark-fonts": "^1.0.36",
16
- "highmark-markdown": "^0.0.197",
17
- "highmark-markdown-style": "^0.0.212",
16
+ "highmark-markdown": "^0.0.199",
17
+ "highmark-markdown-style": "^0.0.213",
18
18
  "lively-cli": "^2.0.55",
19
19
  "necessary": "^13.6.1",
20
20
  "occam-entities": "^1.0.90"
@@ -41,7 +41,7 @@
41
41
  </style>
42
42
  <style>
43
43
 
44
- ${computerModernStyle}
44
+ ${computerModernStyleCSS}
45
45
 
46
46
  </style>
47
47
  <style>