Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

base-watch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-watch

Watch plugin for base applications.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
128
-41.55%
Maintainers
1
Weekly downloads
 
Created
Source

base-watch NPM version Build Status

Watch plugin for base applications.

Heads up this plugin should be used with base-tasks.

Install

Install with npm:

$ npm i base-watch --save

Usage

var watch = require('base-watch');

API

.plugin

Adds a watch method to your app that takes a file, directory, or glob pattern and watches for changes to those files. When a change occurs, the specified task(s) or function will execute.

If no task(s) or function is specified, only the instance of FSWatcher is returned and can be used directly. See chokidar.watch for more information.

  • returns {Function}: plugin function to be used in a base application.

Example

app.use(watch());

watch

Watch a file, directory, or glob pattern for changes and build a task or list of tasks when changes are made. Watch is powered by chokidar so arguments can be anything supported by chokidar.watch.

Params

  • glob {String|Array}: Filename, Directory name, or glob pattern to watch
  • options {Object}: Additional options to be passed to chokidar
  • tasks {String|Array|Function}: Tasks that are passed to .build when files in the glob are changed.
  • returns {Object}: Returns an instance of FSWatcher from chokidar

Example

var watcher = app.watch('templates/pages/*.hbs', ['site']);

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Brian Woodward

License

Copyright © 2016 Brian Woodward Released under the MIT license.

This file was generated by verb on January 28, 2016.

FAQs

Package last updated on 28 Jan 2016

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