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

Clarification on re: diffing 2 directories #7

Open
benjaminapetersen opened this issue Mar 10, 2016 · 1 comment
Open

Clarification on re: diffing 2 directories #7

benjaminapetersen opened this issue Mar 10, 2016 · 1 comment

Comments

@benjaminapetersen
Copy link

Greetings!

So the README has a nice usage example, but doesn't quite work as I expected. Example:

// 'build-to-temp-folder' does what 'build' does, just in ./.tmp
// this is so I can then test .dist against .tmp and validate that 
// the build task was run before merging in a branch.
// Jenkins will run this task & if there is a diff should fail.
gulp.task('verify', ['build-to-temp-folder'], function() {
  return gulp
           // get the tmp files
          .src(tmpAll)   // tmpAll = './.tmp/**/*'
           // compare it to the build, there should be no diff
          .pipe(diff(distAll))  // distAll = './dist/**/*'
           // if there is, fail so Jenkins knows to say "not passing"
          .pipe(diff.reporter({ fail: true }));
});

This line:

.pipe(diff(/* 'target directory to diff against', defaults to diff against original source file */))

is what made me think this will work, but I get an events.js:141 throw er; // Unhandled 'error' event. It appears that you may only be able to gulp.src(files).pipe(doSomething()).pip(diff()), and test for a diff. Is there anyway to do what I am intending?

Browsing source now to see if I can figure this out.

@benjaminapetersen
Copy link
Author

ping! just checking if this repo is still alive.

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

1 participant