File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -44,3 +44,14 @@ steps:
44
44
plugins :
45
45
- docker#v3.0.1:
46
46
image : " node:10"
47
+
48
+ - label : " 🌐 i18n"
49
+ command :
50
+ - " echo '--- Fetching Dependencies'"
51
+ - " ./scripts/fetch-develop.deps.sh --depth 1"
52
+ - " yarn install"
53
+ - " echo '+++ Testing i18n output'"
54
+ - " yarn diff-i18n"
55
+ plugins :
56
+ - docker#v3.0.1:
57
+ image : " node:10"
Original file line number Diff line number Diff line change 30
30
"reskindex:watch" : " reskindex -h src/header -w" ,
31
31
"i18n" : " matrix-gen-i18n" ,
32
32
"prunei18n" : " matrix-prune-i18n" ,
33
+ "diff-i18n" : " cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json" ,
33
34
"build:res" : " node scripts/copy-res.js" ,
34
35
"build:modernizr" : " modernizr -c .modernizr.json -d src/vector/modernizr.js" ,
35
36
"build:compile" : " yarn reskindex && babel --source-maps -d lib src" ,
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