search

Home  >  Q&A  >  body text

javascript - 请教一个package.json相关的问题。

天蓬老师天蓬老师2872 days ago523

reply all(4)I'll reply

  • 阿神

    阿神2017-04-17 16:35:28

    It looks like tools/run 应该是主脚本,那么 start should be the parameter of this script

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 16:35:28

    Oh, sorry for the late reply.

    What you are looking at is my webpack react seed project code written by imitating kriasoft.

    The meaning of this code is to use babel-node to call the run.js script file in the tools directory. The run.js script file calls all build tasks (including functions such as logging), and the last parameter is start. Represents the task of directly calling tools/start.js. The start task is to start the dev server and implement the hot loading function.

    reply
    0
  • 阿神

    阿神2017-04-17 16:35:28

    This should be React Starter Kit?

    "start": "babel-node tools/run start"

    The command will first call tools/run.js, then tools/start.js, and then tools/webpack.config.js

    reply
    0
  • 阿神

    阿神2017-04-17 16:35:28

    The npm start command executes the code you wrote in start. For example, if you want to use npm start to run a Nodejs service file, you can change it to start: "node server", which is the same as running node server

    reply
    0
  • Cancelreply