Giter Club home page Giter Club logo

hyperf-reload's Introduction

Hyperf Reload

开发环境监听文件变化,自动重启 Hyperf-Service

⚠️当前版本仅在macos/linux测试通过,使用windows的同学欢迎试(cai)用(keng),有问题请提交issue,会尽快调整。

安装

需要nodejs环境,对nodejs/npm不熟悉的同学请移步此处,教你熟练掌握nodejs的安装与卸载。。。

1. NPM安装(推荐)

$ npm i hyperf-reload -g

$ hyperf-reload --help

2. 本地安装

$ git clone [repository] --depth=1
$ cd hyperf-reload
$ npm i

$ ./bin/hyperf-reload --help

用例

1. 基本

$ hyperf-reload /path/to/hyperf.php

2. 忽略指定文件(夹)的监听

默认忽略 **/.* **/test/* **/runtime/* **/.idea/* 可根据需要自定义。

$ hyperf-reload -i "**/docs/* **/.* **/test/* **/runtime/* **/.idea/*" /path/to/hyperf.php

⚠️ 规则请参考 anymatch

3. 监听多个文件夹

某些特殊情况,需要同时监听多个文件夹。

$ hyperf-reload /path/to/hyperf.php /path/to/resources1 /path/to/resources2 /path/to/resources3

PhpStorm集成

菜单 > Run > Edit Configurations > Add > Node.js

  • Working directory: 项目文件夹
  • JavaScript file: /usr/local/node/bin/hyperf-reload
  • Application parameters: 项目文件夹/bin/hyperf.php

命令行参数

$ hyperf-reload --help

Usage: hyperf-reload [options] <hyperf-file> [watch-dirs...]

开发环境监听文件变化,自动重启 Hyperf-Service

Options:
  -i, --ignored <files>  忽略指定文件(夹)的监听 (default: "**/.* **/vendor/** **/test/** **/runtime/**")
  -i, --php <filepath>   PHP执行文件路径 (default: "php")
  -d, --debug            是否显示调试信息
  -V, --version          output the version number
  -h, --help             output usage information

hyperf-reload's People

Contributors

maosong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.