File tree Expand file tree Collapse file tree 7 files changed +17
-12
lines changed
babel-plugin-fbtee-auto-import
babel-plugin-fbtee-runtime Expand file tree Collapse file tree 7 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @nkzw/fbtee-internal" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "private" : true ,
55 "license" : " MIT" ,
66 "type" : " module" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @nkzw/babel-fbtee" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "description" : " The JavaScript & React Internationalization Framework." ,
55 "keywords" : [
66 " fbt" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @nkzw/babel-plugin-fbtee-auto-import" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "description" : " The JavaScript & React Internationalization Framework." ,
55 "keywords" : [
66 " fbt" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @nkzw/babel-plugin-fbtee-runtime" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "description" : " The JavaScript & React Internationalization Framework." ,
55 "keywords" : [
66 " fbt" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @nkzw/babel-plugin-fbtee" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "description" : " The JavaScript & React Internationalization Framework." ,
55 "keywords" : [
66 " fbt" ,
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const argv = y
121121 '[<source_file1>, ...]}. Otherwise stdin itself will be parsed' ,
122122 )
123123 . string ( args . COMMON_STRINGS )
124- . default ( args . COMMON_STRINGS , null )
124+ . default ( args . COMMON_STRINGS , '' )
125125 . describe (
126126 args . COMMON_STRINGS ,
127127 'Optional path to the common strings module. ' +
@@ -240,12 +240,17 @@ if (argv.help) {
240240 ? ( await import ( transformPath ) ) . default
241241 : null ;
242242
243- const commonPath = argv [ args . COMMON_STRINGS ] ;
244- const fbtCommon = commonPath
243+ const commonFile = argv [ args . COMMON_STRINGS ] ;
244+ const fbtCommon = commonFile ?. length
245245 ? (
246- await import ( resolve ( process . cwd ( ) , commonPath ) , {
247- with : { type : 'json' } ,
248- } )
246+ await import (
247+ resolve ( process . cwd ( ) , commonFile ) ,
248+ commonFile . endsWith ( '.json' )
249+ ? {
250+ with : { type : 'json' } ,
251+ }
252+ : { }
253+ )
249254 ) . default
250255 : null ;
251256
Original file line number Diff line number Diff line change 11{
22 "name" : " fbtee" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "description" : " The JavaScript & React Internationalization Framework." ,
55 "keywords" : [
66 " fbt" ,
You can’t perform that action at this time.
0 commit comments