File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
-
3
- const yargs = require ( 'yargs' ) ;
4
2
const LargeFileDiff = require ( '../index.js' ) ;
5
3
6
- const argv = yargs
7
- . usage ( '$0 file1 file2' )
8
- . help ( 'help' ) . alias ( 'help' , 'h' ) . describe ( 'h' , 'Show help.' )
9
- . epilog ( 'Home page and docs: https://github.com/niiknow/text-file-diff' )
10
- . demand ( 2 )
11
- . argv ;
4
+ const argv = process . argv ;
5
+
6
+ if ( argv . length < 4 ) {
7
+ console . log ( '-: require two files as arguments' ) ;
8
+ console . log ( 'usage: text-file-diff file1 file2\n' ) ;
9
+ process . exit ( 1 ) ;
10
+ }
12
11
13
- const file1 = argv . _ [ 0 ] ;
14
- const file2 = argv . _ [ 1 ] ;
12
+ const file1 = argv [ 2 ] ;
13
+ const file2 = argv [ 3 ] ;
15
14
16
15
const lfd = new LargeFileDiff ( {
17
16
skipHeader : argv . skipHeader
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " text-file-diff" ,
3
- "version" : " 1.0.5 " ,
3
+ "version" : " 1.0.6 " ,
4
4
"description" : " line by line diff of two large files" ,
5
5
"license" : " MIT" ,
6
6
"repository" : " niiknow/text-file-diff" ,
28
28
" compare-files"
29
29
],
30
30
"dependencies" : {
31
- "n-readlines" : " ^0.2.8" ,
32
- "yargs" : " ^9.0.1"
31
+ "n-readlines" : " ^0.2.8"
33
32
},
34
33
"devDependencies" : {
35
34
"ava" : " ^0.20.0" ,
36
- "nyc" : " ^11.0.0 " ,
35
+ "nyc" : " ^11.4.1 " ,
37
36
"xo" : " ^0.18.2"
38
37
},
39
38
"xo" : {
You can’t perform that action at this time.
0 commit comments