@portosaur/cli 0.2.0 → 0.3.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/package.json +4 -4
- package/src/commands/build.mjs +10 -0
- package/src/templates/gitignore +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portosaur/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "CLI for Portosaur - The static Personal portfolio site generator.",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"author": "soymadip",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"types": "./src/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@portosaur/core": "^0.
|
|
30
|
-
"@portosaur/logger": "^0.
|
|
31
|
-
"@portosaur/wizard": "^0.
|
|
29
|
+
"@portosaur/core": "^0.3.0",
|
|
30
|
+
"@portosaur/logger": "^0.3.0",
|
|
31
|
+
"@portosaur/wizard": "^0.3.0",
|
|
32
32
|
"commander": "^13.1.0",
|
|
33
33
|
"js-yaml": "^4.1.1"
|
|
34
34
|
}
|
package/src/commands/build.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
loadUserConfig,
|
|
13
13
|
generateFavicons,
|
|
14
14
|
generateRobotsTxt,
|
|
15
|
+
getCssVar,
|
|
15
16
|
} from "@portosaur/core";
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -50,12 +51,21 @@ export async function buildCommand(siteDir, extraArgs = []) {
|
|
|
50
51
|
|
|
51
52
|
logger.info("Generating site assets...");
|
|
52
53
|
|
|
54
|
+
const cssFilesToParse = [
|
|
55
|
+
path.join(portoPaths.theme, "css/custom.css"),
|
|
56
|
+
path.join(portoPaths.theme, "css/overrides/variables.css"),
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const themeColor =
|
|
60
|
+
getCssVar("--ifm-color-primary", cssFilesToParse) || "#3578e5";
|
|
61
|
+
|
|
53
62
|
const faviconRes = await generateFavicons(UserRoot, {
|
|
54
63
|
imagePath: userConfig.home_page?.hero?.profile_pic,
|
|
55
64
|
siteTitle: userConfig.site?.title,
|
|
56
65
|
siteTagline: userConfig.site?.tagline,
|
|
57
66
|
staticDirs: ["static"],
|
|
58
67
|
portoAssetsDir: portoPaths.assets,
|
|
68
|
+
themeColor: themeColor,
|
|
59
69
|
});
|
|
60
70
|
|
|
61
71
|
const configPath = writeConfigShim(UserRoot, portoPaths, {
|
package/src/templates/gitignore
CHANGED