Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with subdirectories #33

Open
jdnichollsc opened this issue Mar 24, 2016 · 7 comments
Open

Error with subdirectories #33

jdnichollsc opened this issue Mar 24, 2016 · 7 comments

Comments

@jdnichollsc
Copy link

Origin:
--- temp/
---------- image1.png
--- image2.png

Destiny:
--- temp/
--- image2.png

Using gulp-clean after gulp-newer, temp folder is deleted instead of temp/image1.png

What do you think? :)

@tschaub
Copy link
Owner

tschaub commented Mar 24, 2016

I'm not sure I follow. Can you provide some example code and a bit more of a description about what you expect and what you get?

@jdnichollsc
Copy link
Author

using gulp-foreach and console.log return temp file instead of temp/image1.png and it is incorrect, the temp directory already exist in the destiny :)

@jdnichollsc
Copy link
Author

ohhh excuse me, your plugin works very nice! Tested with vinylPaths and del packages 👯

My example:

var destiny = "www/img/**/*";
var origin = "app/img";
gulp.task('clean-images', function () {
  return gulp.src(destiny, {read: false})
    .pipe(newer(origin))
    .pipe(vinylPaths(del));
});

Regards, Nicholls

@jdnichollsc
Copy link
Author

Ohhh with more tests, this plugin works incorrect with subdirectories:
--- origin
------- temp/
----------- image1.png
----------- image2.png
------- image3.png

--- destiny
------- temp/
----------- image1.png
------- image3.png

and vinylPaths return the following:

Paths: origin\temp
Paths: origin\temp\image2.png

but the only new path is origin\temp\image2.png

@jdnichollsc
Copy link
Author

What do you think about to create a new option parameter to compare without use modified date of the files and directories? (Only the path)

@tschaub
Copy link
Owner

tschaub commented Mar 25, 2016

@jdnichollsc thanks for the additional detail, but I still don't think you have described the problem enough for anybody to be able to reproduce it.

Please provide a complete example. Include the steps you take. Describe what you expect. Describe what you get. This will help others understand the issue you are seeing.

One nice way to set up an example is to create a repository with the minimum needed to reproduce your issue. The readme.md can describe what steps to take to see the problem.

@jdnichollsc
Copy link
Author

Hi man, see my example to reproduce the issue: https://github.com/jdnichollsc/gulp-newer-issue

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants