Files
vscode/build/lib/watch/index.js
Erich Gamma 8f35cc4768 Hello Code
2015-11-13 14:39:38 +01:00

25 lines
757 B
JavaScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var es = require('event-stream');
function handleDeletions() {
return es.mapSync(function (f) {
if (!f.contents) {
f.contents = new Buffer('');
f.stat = { mtime: new Date() };
}
return f;
});
}
var watch = process.platform === 'win32' ? require('./watch-win32') : require('gulp-watch');
module.exports = function () {
return watch.apply(null, arguments)
.pipe(handleDeletions());
};