Skip to content

Commit

Permalink
File deletion in Atom causes renaming to trash
Browse files Browse the repository at this point in the history
  • Loading branch information
floatdrop committed Sep 6, 2014
1 parent ebce7a0 commit 8eccf08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ Default: `false`

This options will enable more verbose output (useful for debugging).

#### options.silent
Type: `Boolean`
Default: `false`

This options will disable all output (useful for tests).

### Methods

Returned `Stream` from constructor have some useful methods:
Expand Down
10 changes: 4 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,20 @@ module.exports = function (globs, opts, cb) {
}

var Gaze = require('gaze');
var gaze = new Gaze(globs);
var gaze = new Gaze(globs, opts);

gaze.on('all', processEvent);

function processEvent(event, filepath) {
var glob = path2glob(filepath, globs, opts);

if (!glob) {
throw new PluginError('gulp-watch',
'Could not match glob to filepath. Globs: ' + globs + '; Filepath: ' + filepath
);
if (!glob && opts.verbose !== false) {
log('not matched by globs', { relative: filepath });
}

var vinyl = new File({
cwd: opts.cwd || process.cwd(),
base: opts.base || glob2base(glob),
base: opts.base || (glob ? glob2base(glob) : undefined),
path: filepath
});

Expand Down

0 comments on commit 8eccf08

Please sign in to comment.