Simple file change monitoring for any kind of development.
Note: Noprob has just been released and I haven't had the chance to test it on Windows yet. I'll get to it soon.
Having a utility that can restart or recompile or reconfigure or rewhatever whenever you change a file can be incredibly convenient. Many programs of this sort are geared to work with a specific toolchain or tend to be overly complicated for what should be a simple task.
No worries. Noprob's got your back, no problem.
Install npm. (it comes with Node.js).
$ npm -g install noprob
- -h, --help
- Output usage information.
- -x, --exec [command]
- String to execute globally on any file change.
- Wrap command strings in single
"quotes (though they can be left off if you are doing a simple command with no spaces or special characters like
- Global commands run once on startup and then upon every file change that matches the specified extensions.
- -l, --local [command]
- String to execute locally on any file that's changed as it is changed. Wrap in quotes as needed.
- Local commands have the unique ability to use command tags to dynamically insert information sections of the changed file's path.
- -w, --watch [directory]
- Directory to watch.
- -e, --extension [extensions]
- List of file extensions to watch. Wrap in quotes as needed.
- Separate extensions with a
- -d, --dot
- Watch hidden dot files.
- Files that begin with a '.' or that are in a folder that begins with a '.' are ignored by default. Use this option to watch them.
Local Command Tags
Tags can be an extremely powerful way to execute commands on specific files. Simply insert the tags into your local command string like
noprob -l 'echo <ext>' and they will be replaced with the associated information from the changed file's path.
- is the full path (e.g.
- is the directory that contains the file (e.g.
- is the full filename including the extension (e.g.
- is the file's name without the extension (e.g.
- is the file's extension (e.g.
To further demonstrate, the following commands are equivalent:
$ noprob -l 'echo <full>'
$ noprob -l 'echo <dir><fullfile>'
$ noprob -l 'echo <dir><name>.<ext>'
though the last command would be left with a trailing
. if the file has no extension while the other two would not.
$ noprob -x 'node server.js' -e 'js'
$ noprob -l 'coffee -c <fullfile>' -e 'coffee' -w src
Copy changed txt files into a mirrored directory tree under the 'copies' folder but with a
.changed before the extension:
$ noprob -l 'mkdir -p copies/<dir> ; cp <full> copies/<dir><name>.changed.<ext>' -e txt