Skip to content

Commit

Permalink
fix changes summary on files headers
Browse files Browse the repository at this point in the history
* since the alignment of the changes the file headers lost the style due to css changes
* update diff dependency and add dev dependencies
  • Loading branch information
rtfpessoa committed Oct 31, 2015
1 parent 45e84c5 commit 54b3915
Show file tree
Hide file tree
Showing 8 changed files with 1,157 additions and 524 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "diff2html",
"version": "1.1.1",
"version": "1.1.3",
"homepage": "http://rtfpessoa.github.io/diff2html/",
"description": "Fast Diff to colorized HTML",
"keywords": [
Expand Down
1,636 changes: 1,131 additions & 505 deletions dist/diff2html.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions dist/diff2html.min.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "diff2html",
"version": "1.1.2",
"version": "1.1.3",
"homepage": "http://rtfpessoa.github.io/diff2html/",
"description": "Fast Diff to colorized HTML",
"keywords": [
Expand Down Expand Up @@ -36,13 +36,17 @@
},
"preferGlobal": "true",
"scripts": {
"test": ""
"release": "bash release.sh"
},
"main": "./src/diff2html.js",
"dependencies": {
"diff": "1.4.0"
"diff": "2.2.*"
},
"devDependencies": {
"webpack": "1.12.*",
"uglifyjs": "2.4.*",
"less": "2.5.*"
},
"devDependencies": {},
"license": "MIT",
"files": [
"src"
Expand Down
4 changes: 0 additions & 4 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ echo "Cleaning previous versions ..."
rm -rf ${OUTPUT_DIR}
mkdir -p ${OUTPUT_DIR}

echo "Preparing dependencies ..."
rm -rf node_modules
npm install

echo "Generating js aggregation file in ${OUTPUT_JS_FILE}"

webpack ./src/diff2html.js ${OUTPUT_JS_FILE}
Expand Down
6 changes: 3 additions & 3 deletions sample/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
Author: rtfpessoa
-->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/github.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css">

<!-- -->
<link rel="stylesheet" type="text/css" href="../dist/diff2html.min.css">
<script type="text/javascript" src="../dist/diff2html.min.js"></script>
<!-- -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/languages/scala.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/languages/scala.min.js"></script>

<script>
var lineDiffExample =
Expand Down
8 changes: 6 additions & 2 deletions src/line-by-line-printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
return '<div id="' + printerUtils.getHtmlId(file) + '" class="d2h-file-wrapper" data-lang="' + file.language + '">\n' +
' <div class="d2h-file-header">\n' +
' <div class="d2h-file-stats">\n' +
' <span class="d2h-lines-added">+' + file.addedLines + '</span>\n' +
' <span class="d2h-lines-deleted">-' + file.deletedLines + '</span>\n' +
' <span class="d2h-lines-added">' +
' <span>+' + file.addedLines + '</span>\n' +
' </span>\n' +
' <span class="d2h-lines-deleted">' +
' <span>-' + file.deletedLines + '</span>\n' +
' </span>\n' +
' </div>\n' +
' <div class="d2h-file-name">' + printerUtils.getDiffName(file) + '</div>\n' +
' </div>\n' +
Expand Down
8 changes: 6 additions & 2 deletions src/side-by-side-printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
return '<div id="' + printerUtils.getHtmlId(file) + '" class="d2h-file-wrapper" data-lang="' + file.language + '">\n' +
' <div class="d2h-file-header">\n' +
' <div class="d2h-file-stats">\n' +
' <span class="d2h-lines-added">+' + file.addedLines + '</span>\n' +
' <span class="d2h-lines-deleted">-' + file.deletedLines + '</span>\n' +
' <span class="d2h-lines-added">' +
' <span>+' + file.addedLines + '</span>\n' +
' </span>\n' +
' <span class="d2h-lines-deleted">' +
' <span>-' + file.deletedLines + '</span>\n' +
' </span>\n' +
' </div>\n' +
' <div class="d2h-file-name">' + printerUtils.getDiffName(file) + '</div>\n' +
' </div>\n' +
Expand Down

0 comments on commit 54b3915

Please sign in to comment.