浏览代码

fix(scripts): добавлен полный путь к пакету

horanchikk 10 月之前
父节点
当前提交
ecc1439f11
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      scripts/dev.ts

+ 5 - 2
scripts/dev.ts

@@ -54,7 +54,7 @@ new Listr(
       title: 'Launching server',
       task: async (_, task) => {
         const shouldStop = false
-        const cmd = spawn('nuxi', ['dev', '--port', '3000'])
+        const cmd = spawn('node', ['node_modules/nuxi/bin/nuxi.mjs', 'dev', '--port', '3000'])
 
         task.title = 'Command spawned'
 
@@ -67,7 +67,10 @@ new Listr(
         })
 
         cmd.on('close', (code) => {
-          task.title = `Process stopped with code: ${code}`
+          task.title = `${task.output}\nProcess stopped with code: ${code}`
+          task.skip()
+          cmd.kill()
+          process.exit()
         })
 
         process.on('SIGINT', async function () {