2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gulp-watchを使って、ファイルを削除した時に書き出したファイルを削除する

Last updated at Posted at 2016-03-14
var gulp = require('gulp'),
gulpwatch = require('gulp-watch'),
del = require('del');

gulp.task('watch', function() {
	gulpwatch(['sorce', 'develop'], function(file){
		if(file.event === 'unlink') {
			del( file.path.replace(/sorce/, 'develop') );
		}
	});
});

gulp.task('default', ['watch']);

もっといいやり方があると思う。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?