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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/toolbox/lib.mjs +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.4.6-beta2",
3
+ "version": "0.4.6-dev2",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
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
- await execShell(`${pm} ${depsList.join(' ')}`.trim())
40
+ child_process.exec(`${pm} ${depsList.join(' ')}`.trim(), {
41
+ cwd: hexoRoot
42
+ }, async (code, stdout, stderr) => {
43
+
44
+ })
40
45
  } catch (e) {
41
- console.log('Skipping hoisting dependencies.')
46
+ throw e
47
+ // console.log('Skipping hoisting dependencies.')
42
48
  }
43
49
  }