File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " matrix-web-i18n" ,
3- "version" : " 1.0.1 " ,
3+ "version" : " 1.1.0 " ,
44 "description" : " Internationalisation utils for Matrix web projects" ,
55 "keywords" : [
66 " i18n"
77 ],
88 "license" : " Apache-2.0" ,
99 "bin" : {
10- "gen-18n" : " scripts/gen-i18n.js" ,
11- "prune-18n" : " scripts/prune-i18n.js"
10+ "gen-i18n" : " scripts/gen-i18n.js" ,
11+ "prune-i18n" : " scripts/prune-i18n.js" ,
12+ "compare-i18n-files" : " scripts/compare-file.js"
1213 },
1314 "repository" : {
1415 "type" : " git" ,
Original file line number Diff line number Diff line change 1+ const fs = require ( "fs" ) ;
2+
3+ if ( process . argv . length < 4 ) throw new Error ( "Missing source and target file arguments" ) ;
4+
5+ const sourceFile = fs . readFileSync ( process . argv [ 2 ] , 'utf8' ) ;
6+ const targetFile = fs . readFileSync ( process . argv [ 3 ] , 'utf8' ) ;
7+
8+ if ( sourceFile !== targetFile ) {
9+ throw new Error ( "Files do not match" ) ;
10+ }
You can’t perform that action at this time.
0 commit comments