nitewatch

2.1.3 • Public • Published

nitewatch travis Status dependencies Status devDependencies Status

nitewatch monitors files within your project for changes and then automatically runs scripts or commands you have to defined. For example, nitewatch can automatically recompile code in a project when a file is modified, sparing you the overhead and letting you focus on writing code.

Install

Install globally

$ npm install -g nitewatch

Or within a project

$ npm install nitewatch --save

Usage

nitewatch can be run within another script:

const nitewatch = require("nitewatch");

const userOpts = {
    ignoredFiles: {"test.js": true},
    ignoredDirs: {"node_modules": true},
    scripts: ["echo Hello World"],
};

nitewatch.watch(options);     

nitewatch can also be ran from the command line when installed globally

nitewatch -y "test" -s "./test.sh" -i "test.js" -d "node_modules" "logs"

nitewatch can also be ran on specific files and directories with the watch command

nitewatch watch src test.js -d .* node_modules

If a .nitewatch.yml is found in the directory when nitewatch is run or a path to a yaml is supplied with the -y option nitewatch will use the yaml defined options.

options

nitewatch will ignore files and directories specified in options. Entries can be file or directory names or patterns.

From the command line:

-d, --dirs: list of directories to ignore
-i, --ignore: list of files to ignore
-s, --scripts: list of scripts or commands to run on file change
-y, --yaml: path to yaml file for options

Using .nitewatch.yml

ignoreFiles:
    - ".eslintrc"
    - ".git"
    - ".gitignore"
    - "*.log"

ignoredDirectories:
    - node_modules
    - .git
    - test

scripts:
    - echo "Hello World!"

License

MIT © Jared Grady

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.31latest

Version History

VersionDownloads (Last 7 Days)Published
2.1.31
2.1.20
2.1.10
2.1.00
2.0.20
2.0.10
2.0.00
1.0.00

Package Sidebar

Install

npm i nitewatch

Weekly Downloads

1

Version

2.1.3

License

MIT

Unpacked Size

19.7 kB

Total Files

11

Last publish

Collaborators

  • thefenderstory