Watch and act! - observar
is a simple file watcher and command executor that helps you during development.
Install observar
globally using npm:
npm install observar -g
Once the installation is done, you can run the command inside your project's directory and set the npm command you want to execute on file changes.
observar -s my_command
By default observar
will watch your current directory but you can also change this setting:
Single folder
observar folder_name -s my_command
Multiple folders
observar folder_name folder2_name -s my_command
Glob Pattern e.g. src/**.js
observar glob_pattern -s my_command
If you want to ignore specific files, directories, etc. add the --ignore or -i argument.
observar folder_name -s my_command -i folder_name
Finally, run this command to see a list of all available options:
observar --help
$ observar src/**.js -s format-lint -i src/ignore-this-folder/
Code released under the MIT License.
Enjoy ⭐️