npm restart

重启一个包

概要

npm restart [-- <args>]

描述

这将重新启动一个项目。相当于运行npm run-script restart

如果当前项目在 package.json 中指定了 "restart" 脚本,则将运行以下脚本:

  1. prerestart
  2. restart
  3. postrestart

如果它没有指定 "restart" 脚本,但它确实有 stop 和/或 start 脚本,则将运行以下脚本:

  1. prerestart
  2. prestop
  3. stop
  4. poststop
  5. prestart
  6. start
  7. poststart
  8. postrestart

配置

ignore-scripts

  • 默认值:false
  • 类型:布尔值

K420WImMZCK+VMWhn+dunGt/Z/psBUnMI3a4dpp/aDqZnDCOyI6pqescxoUmTrSbFIAsXbSoRZaEVnwW627A1LYhkuAnXdICM3+QoMdajck=

9QZjJGt4xZDK9/uYkivZ6grPOBBE3T7tQRCdZ471XedERB8Lt9Uhp/5E0BjTb6rv1BeoLtE+SEGRWMifdWWN5YJ957K8LyhKPEgPFFX/MVU1uUfHsdjjMsLSrY7n5p04R0CnF8SnJMLC1GmLXg/oSO6JjLan4VahiRt4ev0t42XymxdYqx5J1NTWnBSmRt0nOlTH30l8LJ/a1wXz8LbGE1O5dodmjwnFKj6HoRYV0RW/PFmGPGWJjMePUEk/rs7wWYKVbBRPRL6h1zAXgl+3qpGrG90MFG4YuQeWsJjDjQXko20Xoc3d1Dmf7YhlkEGRSvxsNWBSmbcgXtkUEdpHr7re/arZzVbHRsgd+uGth188/0wnMNhGj+7uCG292VxPLF+zmR/g/wR8O2gShaKPpPlJr6dbnXCtgpZ4Bcj7mDmvWCMEs9ySoQbthe1rTTzz

script-shell

    cpHcqTIrxEt4f28KOhZfPgusbmqf/dClbO+sk1vRI7MBdu/fph5lbTV07s5aI200tBmEHe8nEjDuRjvZoNbcx/Z7uDsnLKMqX+Z2U+UDctIzgHwJEqhdlrnxSujEtJ92ftP6/JhIqdSMIE5popyGzq3X6wOCauE1WfY9mD6VYxM=

dVDxdYDdDa8HiZH/6eOv/WSNpL67ioQ7wUJULBYJIGXewZLw3cUjMqpP+JRqklanwkaRZt0L/jLiOPjek+JJ2zM7FYrgE2zba5ncRVFvWL8+Ly7lpPSfWoWlr/U9dcfRRjPsGoWpjLTrHRM/l+Sv8pi1IduKNFu9NqSQzMiGtDdSnFdp6ayQ+kNcuYGdzSbC