highmark-cli 0.0.183 → 0.0.184
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/bin/action/publish.js +2 -2
- package/bin/constants.js +0 -4
- package/bin/operation/copyHTML.js +23 -0
- package/package.json +2 -3
- package/bin/operation/indexHTML.js +0 -49
- package/template/index.html +0 -64
package/bin/action/publish.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const watchOperation = require("../operation/watch"),
|
|
4
4
|
serverOperation = require("../operation/server"),
|
|
5
|
+
copyHTMLOperation = require("../operation/copyHTML"),
|
|
5
6
|
copyFontsOperation = require("../operation/copyFonts"),
|
|
6
|
-
indexHTMLOperation = require("../operation/indexHTML"),
|
|
7
7
|
markdownHTMLOperation = require("../operation/markdownHTML"),
|
|
8
8
|
copyClientFilesOperation = require("../operation/copyClientFiles"),
|
|
9
9
|
markdownStylesCSSOperation = require("../operation/markdownStylesCSS");
|
|
@@ -17,7 +17,7 @@ function publishAction(port, watch, quietly, copyFonts, startServer, inputFilePa
|
|
|
17
17
|
markdownStylesCSSOperation,
|
|
18
18
|
copyClientFilesOperation,
|
|
19
19
|
copyFontsOperation,
|
|
20
|
-
|
|
20
|
+
copyHTMLOperation,
|
|
21
21
|
serverOperation,
|
|
22
22
|
watchOperation
|
|
23
23
|
],
|
package/bin/constants.js
CHANGED
|
@@ -7,8 +7,6 @@ const FONT = "font",
|
|
|
7
7
|
LIVE_RELOAD_PATH = "/live-reload",
|
|
8
8
|
INDEX_HTML_FILE_NAME = "index.html",
|
|
9
9
|
DIVS_SELECTOR_STRING = "body > div",
|
|
10
|
-
INDEX_TEMPLATE_FILE_PATH = "template/index.html",
|
|
11
|
-
CLIENT_TEMPLATE_FILE_PATH = "template/client.html",
|
|
12
10
|
CLIENT_DIVS_SELECTOR_STRING = "body > div.view > div.divisions > div",
|
|
13
11
|
DEFAULT_DIVISION_IDENTIFIER = "default";
|
|
14
12
|
|
|
@@ -20,8 +18,6 @@ module.exports = {
|
|
|
20
18
|
LIVE_RELOAD_PATH,
|
|
21
19
|
INDEX_HTML_FILE_NAME,
|
|
22
20
|
DIVS_SELECTOR_STRING,
|
|
23
|
-
INDEX_TEMPLATE_FILE_PATH,
|
|
24
|
-
CLIENT_TEMPLATE_FILE_PATH,
|
|
25
21
|
CLIENT_DIVS_SELECTOR_STRING,
|
|
26
22
|
DEFAULT_DIVISION_IDENTIFIER
|
|
27
23
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { copyHTML } = require("highmark-client");
|
|
4
|
+
|
|
5
|
+
function copyHTMLOperation(proceed, abort, context) {
|
|
6
|
+
const { copyClientFiles } = context;
|
|
7
|
+
|
|
8
|
+
if (copyClientFiles) {
|
|
9
|
+
proceed();
|
|
10
|
+
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { markdownHTML, markdownStylesCSS, outputDirectoryPath } = context,
|
|
15
|
+
noClient = true,
|
|
16
|
+
targetDirectoryPath = outputDirectoryPath; ///
|
|
17
|
+
|
|
18
|
+
copyHTML(markdownHTML, markdownStylesCSS, noClient, targetDirectoryPath);
|
|
19
|
+
|
|
20
|
+
proceed();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = copyHTMLOperation;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "highmark-cli",
|
|
3
3
|
"author": "James Smith",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.184",
|
|
5
5
|
"license": "MIT, Anti-996",
|
|
6
6
|
"homepage": "https://github.com/djalbat/highmark-cli",
|
|
7
7
|
"description": "Extensible, styleable Markdown.",
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"argumentative": "^2.0.28",
|
|
14
14
|
"express": "^4.19.2",
|
|
15
|
-
"highmark-client": "^0.0.
|
|
16
|
-
"highmark-fonts": "^1.0.43",
|
|
15
|
+
"highmark-client": "^0.0.21",
|
|
17
16
|
"highmark-markdown": "^0.0.245",
|
|
18
17
|
"lively-cli": "^2.0.59",
|
|
19
18
|
"necessary": "^13.6.6",
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { liveReloadSnippet } = require("lively-cli"),
|
|
4
|
-
{ pathUtilities, packageUtilities, templateUtilities } = require("necessary"),
|
|
5
|
-
{ computerModernStyle: computerModernStyleCSS } = require("highmark-fonts");
|
|
6
|
-
|
|
7
|
-
const { writeFile } = require("../utilities/fileSystem"),
|
|
8
|
-
{ INDEX_HTML_FILE_NAME, INDEX_TEMPLATE_FILE_PATH } = require("../constants");
|
|
9
|
-
|
|
10
|
-
const { parseFile } = templateUtilities,
|
|
11
|
-
{ getPackagePath } = packageUtilities,
|
|
12
|
-
{ concatenatePaths } = pathUtilities;
|
|
13
|
-
|
|
14
|
-
function indexHTMLOperation(proceed, abort, context) {
|
|
15
|
-
const { copyClientFiles } = context;
|
|
16
|
-
|
|
17
|
-
if (copyClientFiles) {
|
|
18
|
-
proceed();
|
|
19
|
-
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const { outputDirectoryPath } = context,
|
|
24
|
-
indexHTML = createIndexHTML(context),
|
|
25
|
-
indexHTMLFilePath = concatenatePaths(outputDirectoryPath, INDEX_HTML_FILE_NAME),
|
|
26
|
-
filePath = indexHTMLFilePath, ///
|
|
27
|
-
content = indexHTML; ///
|
|
28
|
-
|
|
29
|
-
writeFile(filePath, content);
|
|
30
|
-
|
|
31
|
-
proceed();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
module.exports = indexHTMLOperation;
|
|
35
|
-
|
|
36
|
-
function createIndexHTML(context) {
|
|
37
|
-
const { markdownHTML, markdownStylesCSS } = context,
|
|
38
|
-
packagePath = getPackagePath(),
|
|
39
|
-
indexTemplateFilePath = concatenatePaths(packagePath, INDEX_TEMPLATE_FILE_PATH),
|
|
40
|
-
args = {
|
|
41
|
-
markdownHTML,
|
|
42
|
-
markdownStylesCSS,
|
|
43
|
-
liveReloadSnippet,
|
|
44
|
-
computerModernStyleCSS
|
|
45
|
-
},
|
|
46
|
-
indexHTML = parseFile(indexTemplateFilePath, args);
|
|
47
|
-
|
|
48
|
-
return indexHTML;
|
|
49
|
-
}
|
package/template/index.html
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
|
|
7
|
-
<link rel="preload" href="font/cmunbbx.woff2" as="font" type="font/woff2" crossorigin />
|
|
8
|
-
<link rel="preload" href="font/cmunbi.woff2" as="font" type="font/woff2" crossorigin />
|
|
9
|
-
<link rel="preload" href="font/cmunbmo.woff2" as="font" type="font/woff2" crossorigin />
|
|
10
|
-
<link rel="preload" href="font/cmunbmr.woff2" as="font" type="font/woff2" crossorigin />
|
|
11
|
-
<link rel="preload" href="font/cmunbx.woff2" as="font" type="font/woff2" crossorigin />
|
|
12
|
-
<link rel="preload" href="font/cmunbxo.woff2" as="font" type="font/woff2" crossorigin />
|
|
13
|
-
<link rel="preload" href="font/cmunit.woff2" as="font" type="font/woff2" crossorigin />
|
|
14
|
-
<link rel="preload" href="font/cmunobi.woff2" as="font" type="font/woff2" crossorigin />
|
|
15
|
-
<link rel="preload" href="font/cmunobx.woff2" as="font" type="font/woff2" crossorigin />
|
|
16
|
-
<link rel="preload" href="font/cmunorm.woff2" as="font" type="font/woff2" crossorigin />
|
|
17
|
-
<link rel="preload" href="font/cmunoti.woff2" as="font" type="font/woff2" crossorigin />
|
|
18
|
-
<link rel="preload" href="font/cmunrm.woff2" as="font" type="font/woff2" crossorigin />
|
|
19
|
-
<link rel="preload" href="font/cmunsi.woff2" as="font" type="font/woff2" crossorigin />
|
|
20
|
-
<link rel="preload" href="font/cmunso.woff2" as="font" type="font/woff2" crossorigin />
|
|
21
|
-
<link rel="preload" href="font/cmunss.woff2" as="font" type="font/woff2" crossorigin />
|
|
22
|
-
<link rel="preload" href="font/cmunsx.woff2" as="font" type="font/woff2" crossorigin />
|
|
23
|
-
<link rel="preload" href="font/cmuntb.woff2" as="font" type="font/woff2" crossorigin />
|
|
24
|
-
<link rel="preload" href="font/cmunti.woff2" as="font" type="font/woff2" crossorigin />
|
|
25
|
-
<link rel="preload" href="font/cmuntt.woff2" as="font" type="font/woff2" crossorigin />
|
|
26
|
-
<link rel="preload" href="font/cmuntx.woff2" as="font" type="font/woff2" crossorigin />
|
|
27
|
-
|
|
28
|
-
<style>
|
|
29
|
-
|
|
30
|
-
*,
|
|
31
|
-
*::after,
|
|
32
|
-
*::before {
|
|
33
|
-
border: 0;
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0;
|
|
36
|
-
box-sizing: border-box;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
html,
|
|
40
|
-
html > body {
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
</style>
|
|
46
|
-
<style>
|
|
47
|
-
|
|
48
|
-
${computerModernStyleCSS}
|
|
49
|
-
|
|
50
|
-
</style>
|
|
51
|
-
<style>
|
|
52
|
-
|
|
53
|
-
${markdownStylesCSS}
|
|
54
|
-
|
|
55
|
-
</style>
|
|
56
|
-
</head>
|
|
57
|
-
<body>
|
|
58
|
-
|
|
59
|
-
${markdownHTML}
|
|
60
|
-
|
|
61
|
-
${liveReloadSnippet}
|
|
62
|
-
|
|
63
|
-
</body>
|
|
64
|
-
</html>
|