Skip to content

Commit

Permalink
Use js-beautify via git config to generate readable min.js diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo authored and sunnavy committed Feb 14, 2025
1 parent 60e15d9 commit e5c361b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.gitignore export-ignore
.gitattributes export-ignore
devel/third-party/ export-ignore
*.min.js diff=minjs
10 changes: 10 additions & 0 deletions docs/hacking.pod
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ to, and does not introduce any unwanted behavior in doing so. Commit
messages explain the B<why> as much as the B<what> of each commit, and
not include extraneous changes.

=head2 Git Config Files

The RT repo has a C<.gitattributes> file with a line that looks for a diff
configuration for minified javascript. To help git generate readable
diffs, you can use a confguration like this after installing the
C<js-beautify> utility.

[diff "minjs"]
textconv = js-beautify
cachetextconv = true

=head1 Code conventions

Expand Down

0 comments on commit e5c361b

Please sign in to comment.