2.1.3 • Published 6 years ago

nitewatch v2.1.3

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

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

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago