@portosaur/cli 0.1.4 → 0.1.5

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
@@ -46,7 +46,7 @@ bun run build
46
46
  If you want to use Portosaur programmatically, install `@portosaur/core`:
47
47
 
48
48
  ```bash
49
- npm install @portosaur/core
49
+ bun install -g @portosaur/core
50
50
  ```
51
51
 
52
52
  See `@portosaur/core` for API documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portosaur/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "CLI for Portosaur - The static Personal portfolio site generator.",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "soymadip",
@@ -26,10 +26,9 @@
26
26
  },
27
27
  "types": "./src/index.d.ts",
28
28
  "dependencies": {
29
- "@portosaur/core": "^0.1.4",
30
- "@portosaur/theme": "^0.1.4",
31
- "@portosaur/logger": "^0.1.4",
32
- "@portosaur/wizard": "^0.1.4",
29
+ "@portosaur/core": "^0.1.5",
30
+ "@portosaur/logger": "^0.1.5",
31
+ "@portosaur/wizard": "^0.1.5",
33
32
  "commander": "^13.1.0",
34
33
  "js-yaml": "^4.1.1"
35
34
  }
@@ -9,6 +9,7 @@
9
9
  "serve": "porto serve"
10
10
  },
11
11
  "dependencies": {
12
- "@portosaur/cli": "^{{portoVer}}"
12
+ "@portosaur/cli": "^{{portoVer}}",
13
+ "@portosaur/theme": "^{{portoVer}}"
13
14
  }
14
15
  }
@@ -1,3 +1,4 @@
1
+ import fs from "node:fs";
1
2
  import path from "node:path";
2
3
 
3
4
  const srcDir = path.resolve(import.meta.dirname, "../");
@@ -29,5 +30,14 @@ export const Paths = {
29
30
  core: path.resolve(pkgDir, "../core"),
30
31
 
31
32
  /** Absolute path to the theme package. */
32
- theme: path.resolve(pkgDir, "../theme"),
33
+ get theme() {
34
+ const localNodeModulesTheme = path.resolve(
35
+ process.cwd(),
36
+ "node_modules/@portosaur/theme",
37
+ );
38
+ if (fs.existsSync(localNodeModulesTheme)) {
39
+ return localNodeModulesTheme;
40
+ }
41
+ return path.resolve(pkgDir, "../theme");
42
+ },
33
43
  };