Last active
February 1, 2017 16:11
-
-
Save tyv/b13bdd617be5a364dd3bd9dd8d023bc9 to your computer and use it in GitHub Desktop.
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
const {watch} = require('chokidar'); | |
const {dir} = require('tmp'); | |
const {mkdirSync, writeFileSync} = require('fs'); | |
dir({unsafeCleanup:true, prefix: 'myTmpDir_'}, (err, path, cleanupCallback) => { | |
watch(path, { | |
ignored: path => console.log(path) | |
}); | |
mkdirSync(`${path}/a`); | |
writeFileSync(`${path}/a/a.txt`, 'a'); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment