Skip to content

Commit e6b7409

Browse files
committed
Update deps
1 parent 82de4b1 commit e6b7409

File tree

8 files changed

+68
-32
lines changed

8 files changed

+68
-32
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Skip bin and coverage folders
2+
bin/**
3+
coverage/**
File renamed without changes.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2014 Rodrigo Fernandes https://rtfpessoa.github.io/
1+
Copyright 2014-2016 Rodrigo Fernandes
22

33
Permission is hereby granted, free of charge, to any person obtaining
44
a copy of this software and associated documentation files (the

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Diff to Html generates pretty HTML diffs from git diff output in your terminal
3232

3333
## Online Example
3434

35-
> Go to [Diff2HTML](http://rtfpessoa.github.io/diff2html/)
35+
> Go to [Diff2HTML](https://diff2html.xyz/)
3636
3737
## Distributions
3838

@@ -55,19 +55,20 @@ Diff to Html generates pretty HTML diffs from git diff output in your terminal
5555
Usage: diff2html [options] -- [diff args]
5656

5757
Options:
58-
-s, --style Output style [string] [choices: "line", "side"] [default: "line"]
59-
--su, --summary Show files summary [string] [choices: "closed", "open", "hidden"] [default: "closed"]
60-
--lm, --matching Diff line matching type [string] [choices: "lines", "words", "none"] [default: "none"]
61-
--lmt, --matchWordsThreshold Diff line matching word threshold [string] [default: "0.25"]
58+
-s, --style Output style [choices: "line", "side"] [default: "line"]
59+
--sc, --synchronisedScroll Synchronised horizontal scroll [choices: "enabled", "disabled"] [default: "enabled"]
60+
--su, --summary Show files summary [choices: "closed", "open", "hidden"] [default: "closed"]
61+
--lm, --matching Diff line matching type [choices: "lines", "words", "none"] [default: "none"]
62+
--lmt, --matchWordsThreshold Diff line matching word threshold [default: "0.25"]
6263
--lmm, --matchingMaxComparisons Diff line matching maximum line comparisons of a block of changes [default: 2500]
63-
-f, --format Output format [string] [choices: "html", "json"] [default: "html"]
64-
-d, --diff Diff style [string] [choices: "word", "char"] [default: "word"]
65-
-i, --input Diff input source [string] [choices: "file", "command", "stdin"] [default: "command"]
66-
-o, --output Output destination [string] [choices: "preview", "stdout"] [default: "preview"]
67-
-u, --diffy Upload to diffy.org [string] [choices: "browser", "pbcopy", "print"]
64+
-f, --format Output format [choices: "html", "json"] [default: "html"]
65+
-d, --diff Diff style [choices: "word", "char"] [default: "word"]
66+
-i, --input Diff input source [choices: "file", "command", "stdin"] [default: "command"]
67+
-o, --output Output destination [choices: "preview", "stdout"] [default: "preview"]
68+
-u, --diffy Upload to diffy.org [choices: "browser", "pbcopy", "print"]
6869
-F, --file Send output to file (overrides output option) [string]
69-
--version Show version number [boolean]
70-
-h, --help Show help [boolean]
70+
--version Show version number
71+
-h, --help Show help
7172

7273
Examples:
7374
diff2html -s line -f html -d word -i command -o preview -- -M HEAD~1
@@ -80,7 +81,7 @@ Diff to Html generates pretty HTML diffs from git diff output in your terminal
8081
diff2html -F my-pretty-diff.html -- -M HEAD~1
8182
-> print to file
8283

83-
© 2014 rtfpessoa
84+
© 2014-2016 rtfpessoa
8485
For support, check out https://github.com/rtfpessoa/diff2html-cli
8586

8687
> NOTE: notice the `--` in the examples
@@ -93,7 +94,7 @@ I will try to review them as soon as possible.
9394

9495
## License
9596

96-
Copyright 2014 Rodrigo Fernandes. Released under the terms of the MIT license.
97+
Copyright 2014-2016 Rodrigo Fernandes. Released under the terms of the MIT license.
9798

9899
## Thanks
99100

circle.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
1+
machine:
2+
node:
3+
version: 6
4+
dependencies:
5+
cache_directories:
6+
- ~/nvm
7+
- ~/.npm
8+
override:
9+
- git clean -dfx
10+
- nvm use 0.12 && nvm alias default 0.12
11+
- npm install
12+
- npm run test
13+
- git clean -dfx
14+
- nvm use 4 && nvm alias default 4
15+
- npm install
16+
- npm run test
17+
- git clean -dfx
18+
- nvm use 5 && nvm alias default 5
19+
- npm install
20+
- npm run test
21+
- git clean -dfx
22+
- nvm use 6 && nvm alias default 6
23+
- npm install
124
test:
225
override:
3-
- nvm install 0.12 && npm test
4-
- nvm install 4 && npm run style && npm test
5-
- nvm install 5 && npm run style && npm test
6-
post:
7-
- nvm install 5 && npm install && npm run style && npm test
8-
- cat ./coverage/lcov.info | ./node_modules/.bin/codacy-coverage
26+
- npm run style
27+
- npm run test
28+
- npm run codacy

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
},
3737
"preferGlobal": true,
3838
"scripts": {
39-
"style": "eslint src/*.js",
39+
"style": "eslint .",
4040
"coverage": "istanbul cover _mocha -- -u exports -R spec ./test/**/*",
41+
"check-coverage": "istanbul check-coverage --statements 90 --functions 90 --branches 85 --lines 90 ./coverage/coverage.json",
4142
"test": "npm run coverage",
42-
"codacy": "npm run coverage && cat ./coverage/lcov.info | codacy-coverage",
43+
"codacy": "cat ./coverage/lcov.info | codacy-coverage",
4344
"preversion": "npm test",
4445
"postversion": "git push && git push --tags"
4546
},
@@ -49,19 +50,19 @@
4950
"main": "./src/main.js",
5051
"dependencies": {
5152
"copy-paste": "^1.3.0",
52-
"diff2html": "^2.0.1",
53+
"diff2html": "^2.0.6",
5354
"extend": "^3.0.0",
5455
"open": "0.0.5",
55-
"request": "^2.73.0",
56-
"yargs": "^4.8.0"
56+
"request": "^2.74.0",
57+
"yargs": "^5.0.0"
5758
},
5859
"devDependencies": {
59-
"codacy-coverage": "^1.1.3",
60-
"eslint": "^3.0.1",
61-
"eslint-plugin-promise": "^1.3.2",
62-
"eslint-plugin-standard": "^1.3.2",
63-
"istanbul": "^0.4.4",
64-
"mocha": "^2.5.3"
60+
"codacy-coverage": "^2.0.0",
61+
"eslint": "^3.5.0",
62+
"eslint-plugin-promise": "^2.0.1",
63+
"eslint-plugin-standard": "^2.0.0",
64+
"istanbul": "^0.4.5",
65+
"mocha": "^3.0.2"
6566
},
6667
"license": "MIT",
6768
"files": [

src/cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@
8383
config.showFilesOpen = baseConfig.summary === 'open';
8484
}
8585

86+
config.synchronisedScroll = (baseConfig.synchronisedScroll === 'enabled');
87+
8688
var htmlContent = diff2Html.getPrettyHtml(jsonContent, config);
8789
return callback(null, that._prepareHTML(htmlContent, config.showFilesOpen));
8890
} else if (baseConfig.format === 'json') {

src/main.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ var argv = yargs.usage('Usage: diff2html [options] -- [diff args]')
2424
default: 'line'
2525
}
2626
})
27+
.options({
28+
'sc': {
29+
alias: 'synchronisedScroll',
30+
describe: 'Synchronised horizontal scroll',
31+
type: 'string',
32+
choices: ['enabled', 'disabled'],
33+
default: 'enabled'
34+
}
35+
})
2736
.options({
2837
'su': {
2938
alias: 'summary',

0 commit comments

Comments
 (0)