foldersync
v1.2.0
Published
Synchronize source and directory files. Overwrite where destination.mtime < source.mtime. Remove files from destination which do not exist in source.
Readme
folderSync
Allows for the synchronization of files. Particularly useful when used in conjunction with a build script within web development environments.
Installation
npm install --save-dev foldersyncUsage
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
Example
$ foldersync src sass/** **/js/** **/css/** distThis 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.
