hexo-theme-shokax 0.4.6-beta2 → 0.4.6-dev2
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 +1 -1
- package/toolbox/lib.mjs +8 -2
package/package.json
CHANGED
package/toolbox/lib.mjs
CHANGED
@@ -22,6 +22,7 @@ async function checkFileAccessible(file) {
|
|
22
22
|
}
|
23
23
|
|
24
24
|
export async function hoistDeps() {
|
25
|
+
console.log(process.cwd())
|
25
26
|
let pm
|
26
27
|
if (await checkFileAccessible('pnpm-lock.yml') || await checkFileAccessible('pnpm-lock.yaml') || await checkFileAccessible('enable_pnpm')) {
|
27
28
|
pm = "pnpm add"
|
@@ -36,8 +37,13 @@ export async function hoistDeps() {
|
|
36
37
|
const latestV = res['dist-tags'].latest
|
37
38
|
const deps = res.versions[latestV].dependencies
|
38
39
|
const depsList = Object.keys(deps).map(d => `${d}@${deps[d]}`)
|
39
|
-
|
40
|
+
child_process.exec(`${pm} ${depsList.join(' ')}`.trim(), {
|
41
|
+
cwd: hexoRoot
|
42
|
+
}, async (code, stdout, stderr) => {
|
43
|
+
|
44
|
+
})
|
40
45
|
} catch (e) {
|
41
|
-
|
46
|
+
throw e
|
47
|
+
// console.log('Skipping hoisting dependencies.')
|
42
48
|
}
|
43
49
|
}
|