New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

php-watcher

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

php-watcher

Watch PHP files and execute a corresponding handler.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

PHP-Watcher

Watch PHP files and execute a corresponding handler.

Prerequisites

Node.js Version >= 8 (might work with older versions, but untested). You can find latest version 8 here. If you currently use an older version of Node and want to keep it, I recommend using NVM (Node Version Manager), which is a tool for managing multiple Node.js versions. You can grab its Windows version here (recommended: latest stable release) and its Mac/Linux version here.

Install

npm install

Usage

npm start

Configuration

Create a js module and export a config object according to API options below. All options are merged with their defaults, so you can spare an option if its default is already covering your needs. Defaults:

module.exports = {
  php: 'C:/php',
  command: 'php/deploy.php',
  watchDir: 'php/src',
  watchOptions: {
    ignored: /(^|[/\\])\../,
    persistent: true
  },
  verbose: true
}

Then, pass it to php-watcher, like so:

node ./node_modules/php-watcher/index.js --conf=watch.conf.js

Ideally, you can assign this command to npm script, like so:

{
  "scripts": {
    "watch": "node ./node_modules/php-watcher/index.js --conf=watch.conf.js"
  }
}

Then, use it:

npm run watch

Options

php
  • Type: String
  • Default: C:/php
  • Description: Absolute path to PHP service.
command
  • Type: String
  • Default: php/deploy.php
  • Description: Command to execute on watch callback.
watchDir
  • Type: String
  • Default: php/src
  • Description: Relative path to watched files.
watchOptions
  • Type: Object
  • Default:
{
  ignored: /(^|[/\\])\../,
  persistent: true
}
  • Description: See options here.
verbose
  • Type: Boolean
  • Default: true
  • Description: Whether to display handler output or not.

Preview

Alt

FAQs

Package last updated on 09 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc