File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ const cli = meow(
1515 -f, --format json | yaml [default: json]
1616 -d, --default-locale default locale
1717 --flat json [default: true] | yaml [default: false]
18- --sort-when-not-flat keys are sorted even when flat option is false [default: false]
1918
2019 Example
2120 $ extract-messages --locales=ja,en --output app/translations 'app/**/*.js'
@@ -26,9 +25,6 @@ const cli = meow(
2625 flat : {
2726 type : 'boolean'
2827 } ,
29- 'sort-when-not-flat' : {
30- type : 'boolean'
31- } ,
3228 output : {
3329 type : 'string' ,
3430 alias : 'o'
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ type Opts = {
6161 defaultLocale : string
6262 format ?: string
6363 flat ?: boolean
64- sortWhenNotFlat ?: boolean
6564 [ key : string ] : unknown
6665}
6766
@@ -73,7 +72,6 @@ const extractMessage = async (
7372 {
7473 format = 'json' ,
7574 flat = isJson ( format ) ,
76- sortWhenNotFlat = false ,
7775 defaultLocale = 'en' ,
7876 ...opts
7977 } : Opts = {
@@ -123,9 +121,7 @@ const extractMessage = async (
123121
124122 const fomattedLocaleMap : object = flat
125123 ? sortKeys ( localeMap , { deep : true } )
126- : sortWhenNotFlat
127- ? sortKeys ( unflatten ( localeMap , { object : true } ) , { deep : true } )
128- : unflatten ( sortKeys ( localeMap ) , { object : true } )
124+ : sortKeys ( unflatten ( localeMap , { object : true } ) , { deep : true } )
129125
130126 const fn = isJson ( format ) ? writeJson : writeYaml
131127
You can’t perform that action at this time.
0 commit comments