Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-watch

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-watch

Watch, that actually is an endless stream

  • 5.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
156K
decreased by-7.01%
Maintainers
2
Weekly downloads
 
Created

What is gulp-watch?

The gulp-watch package is a file watcher that is used in conjunction with Gulp, a popular build system for automating tasks in web development. It allows developers to watch files and directories for changes and execute tasks automatically when changes are detected.

What are gulp-watch's main functionalities?

Watch Files for Changes

This feature allows you to watch JavaScript files in the 'src' directory and its subdirectories. When any of these files change, the 'scripts' task is automatically executed.

const gulp = require('gulp');
const watch = require('gulp-watch');

watch('src/**/*.js', function() {
  gulp.start('scripts');
});

Watch with Options

This feature demonstrates how to use options with gulp-watch. The 'ignoreInitial' option is set to false, meaning the 'styles' task will run immediately when the watch starts, as well as on subsequent changes.

const gulp = require('gulp');
const watch = require('gulp-watch');

watch('src/**/*.css', { ignoreInitial: false }, function() {
  gulp.start('styles');
});

Watch Multiple File Types

This feature shows how to watch multiple types of files. Both JavaScript and CSS files in the 'src' directory are watched, and the 'build' task is executed when any of these files change.

const gulp = require('gulp');
const watch = require('gulp-watch');

watch(['src/**/*.js', 'src/**/*.css'], function() {
  gulp.start('build');
});

Other packages similar to gulp-watch

Keywords

FAQs

Package last updated on 23 Jul 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