@@ -8,15 +8,15 @@ import { spawn } from './utils/spawn';
88export type ArgName =
99 | 'slug'
1010 | 'description'
11- | 'author-name '
12- | 'author-email '
13- | 'author-url '
14- | 'repo-url '
11+ | 'authorName '
12+ | 'authorEmail '
13+ | 'authorUrl '
14+ | 'repoUrl '
1515 | 'languages'
1616 | 'type'
1717 | 'local'
1818 | 'example'
19- | 'react-native-version ' ;
19+ | 'reactNativeVersion ' ;
2020
2121export type ProjectLanguages = 'kotlin-objc' | 'kotlin-swift' | 'cpp' | 'js' ;
2222
@@ -142,53 +142,54 @@ export type Question = Omit<
142142} ;
143143
144144export const acceptedArgs : Record < ArgName , yargs . Options > = {
145- ' slug' : {
145+ slug : {
146146 description : 'Name of the npm package' ,
147147 type : 'string' ,
148148 } ,
149- ' description' : {
149+ description : {
150150 description : 'Description of the npm package' ,
151151 type : 'string' ,
152152 } ,
153- 'author-name' : {
153+ authorName : {
154154 description : 'Name of the package author' ,
155155 type : 'string' ,
156156 } ,
157- 'author-email' : {
157+ authorEmail : {
158158 description : 'Email address of the package author' ,
159159 type : 'string' ,
160160 } ,
161- 'author-url' : {
161+ authorUrl : {
162162 description : 'URL for the package author' ,
163163 type : 'string' ,
164164 } ,
165- 'repo-url' : {
165+ repoUrl : {
166166 description : 'URL for the repository' ,
167167 type : 'string' ,
168168 } ,
169- ' languages' : {
169+ languages : {
170170 description : 'Languages you want to use' ,
171171 choices : LANGUAGE_CHOICES . map ( ( { value } ) => value ) ,
172172 } ,
173- ' type' : {
173+ type : {
174174 description : 'Type of library you want to develop' ,
175175 choices : TYPE_CHOICES . map ( ( { value } ) => value ) ,
176176 } ,
177- 'react-native-version' : {
177+ reactNativeVersion : {
178178 description : 'Version of React Native to use, uses latest if not specified' ,
179179 type : 'string' ,
180180 } ,
181- ' local' : {
181+ local : {
182182 description : 'Whether to create a local library' ,
183183 type : 'boolean' ,
184184 } ,
185- ' example' : {
185+ example : {
186186 description : 'Type of the example app to create' ,
187187 type : 'string' ,
188188 choices : EXAMPLE_CHOICES . map ( ( { value } ) => value ) ,
189189 } ,
190- } ;
190+ } as const ;
191191
192+ export type Args = Record < ArgName | 'name' , string > ;
192193export type SupportedArchitecture = 'new' | 'mixed' | 'legacy' ;
193194export type ExampleApp = 'none' | 'test-app' | 'expo' | 'vanilla' ;
194195
@@ -214,7 +215,7 @@ export async function createQuestions({
214215} : {
215216 basename : string ;
216217 local : boolean ;
217- argv : Record < string , string > ;
218+ argv : Args ;
218219} ) {
219220 let name , email ;
220221
0 commit comments