@x-withu/page-withu 0.0.3 → 0.0.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/bin/page-withu.js +3 -1
- package/package.json +1 -1
- package/template/src/app.vue +1 -1
package/bin/page-withu.js
CHANGED
|
@@ -7,6 +7,8 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import ora from 'ora';
|
|
9
9
|
|
|
10
|
+
const pkg = await fs.readJson(new URL('../package.json', import.meta.url));
|
|
11
|
+
|
|
10
12
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
13
|
const __dirname = path.dirname(__filename);
|
|
12
14
|
const templateDir = path.resolve(__dirname, '../template');
|
|
@@ -16,7 +18,7 @@ const program = new Command();
|
|
|
16
18
|
program
|
|
17
19
|
.name('page-withu')
|
|
18
20
|
.description('CLI to scaffold a lightweight, elegant personal homepage')
|
|
19
|
-
.version(
|
|
21
|
+
.version(pkg.version);
|
|
20
22
|
|
|
21
23
|
program
|
|
22
24
|
.command('create [project-name]')
|
package/package.json
CHANGED
package/template/src/app.vue
CHANGED
|
@@ -84,7 +84,7 @@ function applyDocumentMeta() {
|
|
|
84
84
|
icon.rel = 'icon'
|
|
85
85
|
document.head.appendChild(icon)
|
|
86
86
|
}
|
|
87
|
-
icon.href = favicon.startsWith('/') ?
|
|
87
|
+
icon.href = favicon === defaultFavicon || !favicon.startsWith('/') ? favicon : withBasePath(favicon)
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
applyDocumentMeta()
|