Allows for the synchronization of files. Particularly useful when used in conjunction with a build script within web development environments.
npm install --save-dev foldersync
Usage: foldersync <src> <ignore> <dest> [options]
<src> Source folder, i.e 'src'.
<dest> Destination folder, i.e 'dist'.
<ignore> File globs to ignore, i.e 'ignore/1/** ignore/2/**'.
<src> will be duplicated as <dest> if it does not exist.
<src> files will overwrite <dest> files if <src> files are newer.
Extraneous <dest> files are removed if they do not exist in <src>.
OPTIONS:
--watch Watches for file changes
$ foldersync src sass/** **/js/** **/css/** dist
This will copy 'src' to 'dist', ignoring the specified folders. If dist does not exist, it will be created, otherwise it will be updated. This is useful for use before running scripts relating to sass / minification, etc.