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(
15
15
-f, --format json | yaml [default: json]
16
16
-d, --default-locale default locale
17
17
--flat json [default: true] | yaml [default: false]
18
- --sort-when-not-flat keys are sorted even when flat option is false [default: false]
19
18
20
19
Example
21
20
$ extract-messages --locales=ja,en --output app/translations 'app/**/*.js'
@@ -26,9 +25,6 @@ const cli = meow(
26
25
flat : {
27
26
type : 'boolean'
28
27
} ,
29
- 'sort-when-not-flat' : {
30
- type : 'boolean'
31
- } ,
32
28
output : {
33
29
type : 'string' ,
34
30
alias : 'o'
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ type Opts = {
61
61
defaultLocale : string
62
62
format ?: string
63
63
flat ?: boolean
64
- sortWhenNotFlat ?: boolean
65
64
[ key : string ] : unknown
66
65
}
67
66
@@ -73,7 +72,6 @@ const extractMessage = async (
73
72
{
74
73
format = 'json' ,
75
74
flat = isJson ( format ) ,
76
- sortWhenNotFlat = false ,
77
75
defaultLocale = 'en' ,
78
76
...opts
79
77
} : Opts = {
@@ -123,9 +121,7 @@ const extractMessage = async (
123
121
124
122
const fomattedLocaleMap : object = flat
125
123
? 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 } )
129
125
130
126
const fn = isJson ( format ) ? writeJson : writeYaml
131
127
You can’t perform that action at this time.
0 commit comments