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

Validate Function #27

Merged
merged 8 commits into from
Mar 8, 2017
Merged

Validate Function #27

merged 8 commits into from
Mar 8, 2017

Conversation

djayard
Copy link
Contributor

@djayard djayard commented Mar 7, 2017

A work requirement led me to write a validate function. We required that checked in code be pretty, and the validate function helps us enforce that policy.

I'm opening the PR since it might be useful to other people.

Denny Ayard added 4 commits December 28, 2016 16:11
Employer needed a function for verification of "pretty". This commit
includes a bug fix I did, so 2.1.1 instead of just 2.1.0.
@coveralls
Copy link

coveralls commented Mar 7, 2017

Coverage Status

Coverage decreased (-3.6%) to 96.429% when pulling 4200acb on djayard:master into b6ce914 on tarunc:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.6%) to 96.429% when pulling 4200acb on djayard:master into b6ce914 on tarunc:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.6%) to 96.429% when pulling 4200acb on djayard:master into b6ce914 on tarunc:master.

@biasso
Copy link
Collaborator

biasso commented Mar 7, 2017

Hi @djayard
I already saw your fork and I was integrating the validate function with other changes.
It works slightly different.
Try to look at the development branch and, if you want, let me know what you think.
I have to test it and make some corrections to the documentation, but now I have not much time.

If you want to try it (not for production):
npm install git://github.com/tarunc/gulp-jsbeautifier.git#dev --save

@coveralls
Copy link

coveralls commented Mar 8, 2017

Coverage Status

Coverage decreased (-3.1%) to 96.875% when pulling 7964fba on djayard:master into b6ce914 on tarunc:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.1%) to 96.875% when pulling 7964fba on djayard:master into b6ce914 on tarunc:master.

Denny Ayard added 3 commits March 8, 2017 01:46
The previous example in the readme didn't work since nothing was reading
the stream. For for 'error' and 'end' events to be fired, something must
attempt to read the reporter's stream.
@coveralls
Copy link

coveralls commented Mar 8, 2017

Coverage Status

Coverage decreased (-3.1%) to 96.875% when pulling 172c92f on djayard:master into b6ce914 on tarunc:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.1%) to 96.875% when pulling 172c92f on djayard:master into b6ce914 on tarunc:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.1%) to 96.875% when pulling 172c92f on djayard:master into b6ce914 on tarunc:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-3.1%) to 96.875% when pulling 172c92f on djayard:master into b6ce914 on tarunc:master.

@djayard djayard changed the base branch from master to dev March 8, 2017 07:50
@coveralls
Copy link

coveralls commented Mar 8, 2017

Coverage Status

Coverage decreased (-0.03%) to 96.875% when pulling 19b7541 on djayard:master into 767e850 on tarunc:dev.

@djayard
Copy link
Contributor Author

djayard commented Mar 8, 2017

@biasso
I changed this PR's target to the dev branch and added some new commits. Please review the changes.

.pipe(prettify.validate())
.pipe(prettify.reporter())
.on('error', function(error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example doesn't work since nothing attempts to read from reporter. Without read attempts, 'error' and 'end' aren't emitted.

@biasso
Copy link
Collaborator

biasso commented Mar 8, 2017

Thank you! It seems all right.
I will publish tomorrow the new version.

@biasso biasso merged commit 475b263 into tarunc:dev Mar 8, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants