The task is simple... write some CircuitPuthon code but have it under git control. The way CircuitPython works, the IoT device shows up as a drive in windows... you update the .py files, the device reboots and reloads.
However, I don't want (obviously) to have all my development happen not hat removable USB drive. So I made a folder on disk, and want to use a watch() task. Every time I change a file, it will copy the changes to the USB drive triggering a device boot. This way I can keep it all nice and newt while still having the convenience.
The problem is that when the destination is a drive root on a removable drive (like 'e:/') the task fails...
Error: EPERM: operation not permitted, mkdir 'e:\'
I would prefer to avoid elevating the command line. I just need a way to tell the dest() function to leave the folder alone if it exists. I am open to any ideas!
var gulp = require('gulp');
var paths = {
code: {
src: 'source/**/*',
dest: 'e:/'
}
}
function code() {
return gulp.src(paths.code.src, {since: gulp.lastRun(code)})
.pipe(gulp.dest(paths.code.dest));
}
function watch() {
gulp.watch(paths.code.src, code);
}
exports.watch = watch;