• 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"
    
  • 相关阅读:
    微信支付遇到的坑
    linux搭载discuz
    关于php自带的访问服务器xml的方法的坑
    yii的验证码
    菜鸟配置阿里云
    ajax(通过jQuery实现)
    leetcode95 Unique Binary Search Trees II
    leetcode96 Unique Binary Search Trees
    leetcode98 Validate Binary Search Tree
    leetcode-99 Recover_Binary_Search_Tree
  • 原文地址:https://www.cnblogs.com/mengfangui/p/12310125.html
Copyright © 2020-2023  润新知