Created
January 11, 2017 20:58
-
-
Save Swivelgames/7b3cd0f24bf95940570d1cff55fdb114 to your computer and use it in GitHub Desktop.
Project Watcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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