Skip to content

A simple EventEmitter that listens for file system changes in a given set of files or directories. Adapted from the Reload plugin in Learnboost's Cluster module

Notifications You must be signed in to change notification settings

richmarr/node-filechangeemitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple module that watches a given set of file system locations and emits events when files are changed.

Install

npm install filechangeemitter

Usage

var fsEmitter = new FileChangeEmitter([
	'./first/location',
	'./another/location'
]);
	
fsEmitter.on('change',function(fileName){
	// your code
});

And to detach the watchers from the filesystem:

fsEmitter.close();

Tests

npm test

About

A simple EventEmitter that listens for file system changes in a given set of files or directories. Adapted from the Reload plugin in Learnboost's Cluster module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published