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

New options added to Pretty Diff #524

Open
3 of 11 tasks
prettydiff opened this issue Aug 23, 2015 · 13 comments
Open
3 of 11 tasks

New options added to Pretty Diff #524

prettydiff opened this issue Aug 23, 2015 · 13 comments

Comments

@Glavin001
Copy link
Owner

Awesome, thanks @prettydiff !

For anyone interested in making a Pull Request and want to know how:

Try to keep the naming standardized. For example, Atom Beautify should have one way to name an option and it should use beautifier mapps to convert naming of options to JS Beautify and Pretty Diff conventions.

@prettydiff
Copy link
Collaborator Author

Just added a new option endcomma in resolution to #534

I am not sure if this will be helpful for you, but I just added support for a .prettydiffrc file. The way it works is that the node-local.js file will first look for this file in the directory currently active in the command prompt and if not available then checks for this file in the application's directory. The file is first checked for JSON format and if not JSON format checks to see if the file is a JavaScript application. The file is not evaluated until after options supplied from the command line are evaluated. The JavaScript application format is available to allow optional complexity so that users can define options conditional upon options supplied from the command line, such as defining options per language, mode, or a combination of options. Here is an example of the file in JavaScript format: http://prettydiff.com/.prettydiffrc

@Glavin001
Copy link
Owner

I am not sure if this will be helpful for you, but I just added support for a .prettydiffrc file.

I think this may be very helpful for users who want to use new Pretty Diff features that Atom Beautify has not yet added support for. Thanks!

@Glavin001
Copy link
Owner

This comment is designed to address #543 and help @abea potentially submit a Pull Request. With some additional thought you could easily implement all of the other options, too.


Here's a TODO list that can guide you to create this Pull Request:

That's it! Let me know if you have any questions.

@Glavin001
Copy link
Owner

I just finished up some stuff for work and have a few minutes before I have to leave. I'll try to implement all of these right now 😃.

@Glavin001
Copy link
Owner

Published to v0.28.12:

  • CSS option no_lead_zero
  • JavaScript option end_with_comma

@prettydiff
Copy link
Collaborator Author

Awesome!

@joshholl
Copy link

added pull request for ternary line option #726

Glavin001 added a commit that referenced this issue Feb 20, 2016
See #524. Added pretty diff ternaryline option
@astanciu
Copy link

@prettydiff

I just added support for a .prettydiffrc file.

Any docs that show where to put this file? you mention:

. The way it works is that the node-local.js file will first look for this file in the directory currently active in the command prompt and if not available then checks for this file in the application's directory.

...but this is confusing in the context of Atom. Unless it's only meant to work as a cli tool

@prettydiff
Copy link
Collaborator Author

@astanciu Just put everything in the .jsbeautifyrc file. Atom Beautify consolidates all options into that one file.

@astanciu
Copy link

I tried that, didn't work for some options. See:
#1191

@Glavin001
Copy link
Owner

Glavin001 commented Sep 13, 2016

@prettydiff : The current Pretty Diff beautifier within Atom-Beautify will only apply the options that are explicitly supported: https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/prettydiff.coffee#L10-L43
This is because the options differ from the language options.
Missing options need to be added.

@Glavin001
Copy link
Owner

For anyone waiting on options, I recommend that you submit a Pull Request yourself. It is very simple. For example: #1193
Thanks!

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

No branches or pull requests

4 participants