Giter VIP home page Giter VIP logo

gulp-deleted's People

Contributors

agarzola avatar dependabot-preview[bot] avatar dependabot[bot] avatar ellukesmith avatar oliverfoster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gulp-deleted's Issues

Task only fires once

I've been working my brain on this: problem is that the task only fires once.

So I have an app folder (= the source folder) with an assets > img folder inside. I have also a _tmp folder (destination folder) with also an assets > img folder inside.

Now what I want is, when deleting images in the app > assets > img folder, it also needs to delete it inside the _tmp > assets > img folder.

It works when deleting a first image, but when deleting a second, third,... image it doesn't delete it in the _tmp > assets > img folder, strange!!

My code:

var deleted = require('gulp-deleted' );

function deleteMatchingFiles() {
	const src = 'app/assets/img/';
	const dest = '_tmp/assets/img/';
	gulp.src(src)
		.pipe(deleted({
			src,
			dest,
			patterns: [
			'*.{png,jpg,jpeg,gif,svg}',
			//'*.jpg',
			//'!app/includes/',
			//'!index.html',
			],
		})
	)
	.pipe(gulp.dest('_tmp/assets/img/'));
}

I also use watch:

gulp.watch('app/assets/img/*.{png,jpg,jpeg,gif,svg}', deleteMatchingFiles);

Apparently it start the 'deleteMatchingFiles' task, but it doesn't finish it...
deleteMatchingFiles-task

Can someone help me?

Kind regards

File Aliases

Stubbled across your package on NPM and so far it's providing useful for keeping my dist and src directories in sync. One limitation that I've noticed is for files that are renamed (e.g. .scss files that are renamed to .css in the dist directory).

Would you accept a PR to add support for aliasing in the diff comparison?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.