zoukankan      html  css  js  c++  java
  • Node自动重启工具 nodemon

    Node自动重启工具 nodemon

    npm地址

    安装

    npm install -g nodemon
    or
    npm install --save-dev nodemon

    参数

    nodemon -h
    显示:

    Options:
    
      --config file ............ alternate nodemon.json config file to use // 备用nodemon.json配置文件使用
      -e, --ext ................ extensions to look for, ie. js,jade,hbs. // 监控指定后缀名的文件
      -x, --exec app ........... execute script with "app", ie. -x "python -v". // 执行的命令
      -w, --watch dir........... watch directory "dir" or files. use once for // 监控文件夹
                                 each directory or file to watch.
      -i, --ignore ............. ignore specific files or directories. // 忽略特定的文件或目录
      -V, --verbose ............ show detail on what is causing restarts. // 显示导致重新启动的详细信息
      -- <your args> ........... to tell nodemon stop slurping arguments. // 告诉nodemon停止参数
    
      Note: if the script is omitted, nodemon will try to read "main" from
      package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee,
      and .litcoffee by default.
    
      For advanced nodemon configuration use nodemon.json: nodemon --help config
      See also the sample: https://github.com/remy/nodemon/wiki/Sample-nodemon.json
    
      Examples:
    
      $ nodemon server.js
      $ nodemon -w ../foo server.js apparg1 apparg2
      $ nodemon --exec python app.py
      $ nodemon --exec "make build" -e "styl hbs"
      $ nodemon app.js -- --config # pass config to app.js
    

    使用

    "build:framework": "nodemon -w src --exec npm run build",
     "build:dist": "node ./bin/weweb ./test",
     "start:dev": "nodemon -w test -w lib/template -e js,json,wxss,wxml --exec npm run build:dist"
    
  • 相关阅读:
    使用SO_REVTIMEO套接字选项为recvfrom设置超时
    使用select为描述符设置超时
    套接字超时设置方法
    使用SIGALARM为recvfrom设置超时
    使用SIGALARM为connect设置超时
    20200410 阿里巴巴Java开发手册
    20200409 Vue 视频学习【归档】
    20200319 Spring MVC 官方文档【归档】
    20200319 Spring Web MVC 2-5
    20200319 Spring Web MVC 1
  • 原文地址:https://www.cnblogs.com/mengfangui/p/12310125.html
Copyright © 2011-2022 走看看