mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 23:59:43 +01:00
25 lines
757 B
JavaScript
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());
|
|
};
|