Skip to content

Instantly share code, notes, and snippets.

@Swivelgames
Created January 11, 2017 20:58
Show Gist options
  • Save Swivelgames/7b3cd0f24bf95940570d1cff55fdb114 to your computer and use it in GitHub Desktop.
Save Swivelgames/7b3cd0f24bf95940570d1cff55fdb114 to your computer and use it in GitHub Desktop.
Project Watcher
var path = require('path');
var watch = require('node-watch');
var fs = require('fs-extra');
watch('./', file => {
const src = path.join('./', file);
const dest = path.join('/Volumes/projects/PROJECT_FOLDER/', file);
fs.copy(
src, dest,
{ 'clobber': true },
(err) => {
if(err) console.error(err);
else console.log(`${src} => ${dest}`);
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment