@@ -23,7 +23,7 @@ const { mv, rm, which, exec } = require('shelljs');
23
23
// Note: These should all be relative to the project root directory
24
24
const rmDirs = [ '.git' , 'tools' ] ;
25
25
const rmFiles = [ '.all-contributorsrc' , '.gitattributes' ] ;
26
- const modifyFiles = [ 'LICENSE' , 'package.json' ] ;
26
+ const modifyFiles = [ 'LICENSE' , 'package.json' , 'README.md' ] ;
27
27
const renameFiles : Array < string > = [ ] ;
28
28
29
29
/**
@@ -163,11 +163,11 @@ function setupLibrary(libraryName: string, generateExample = false) {
163
163
exec ( 'npx create-react-app example' ) ;
164
164
exec ( 'echo "SKIP_PREFLIGHT_CHECK=true" >> example/.env' ) ;
165
165
}
166
+ mv ( 'tools/README.md' , 'README.md' ) ;
166
167
removeItems ( ) ;
167
168
168
169
modifyGitignoreFile ( ) ;
169
170
modifyContents ( libraryName , username , usermail ) ;
170
- // renameItems(libraryName);
171
171
172
172
if ( generateExample ) {
173
173
console . log ( yellow ( 'Linking packages to the example app...' ) ) ;
@@ -215,14 +215,12 @@ const _promptSchemaLibrarySuggest = {
215
215
properties : {
216
216
useSuggestedName : {
217
217
description : cyan (
218
- 'Would you like it to be called "' +
219
- libraryNameSuggested ( ) +
220
- '"? [Yes/No]'
218
+ 'Would you like it to be called "' + libraryNameSuggested ( ) + '"? [y/n]'
221
219
) ,
222
220
pattern : / ^ ( y ( e s ) ? | n ( o ) ? ) $ / i,
223
221
type : 'string' ,
224
222
required : true ,
225
- message : 'You need to type "Yes " or "No " to continue...' ,
223
+ message : 'You need to type "[y]es " or "[n]o " to continue...' ,
226
224
} ,
227
225
} ,
228
226
} ;
@@ -231,12 +229,12 @@ const _promptInstallExampleApp = {
231
229
properties : {
232
230
installExampleApp : {
233
231
description : yellow (
234
- 'Would you like to generate an example react app to test your library/component? [Yes/No ]'
232
+ 'Would you like to generate an example react app to test your library/component? [y/n ]'
235
233
) ,
236
234
pattern : / ^ ( y ( e s ) ? | n ( o ) ? ) $ / i,
237
235
type : 'string' ,
238
236
required : true ,
239
- message : 'You need to type "Yes " or "No " to continue...' ,
237
+ message : 'You need to type "[y]es " or "[n]o " to continue...' ,
240
238
} ,
241
239
} ,
242
240
} ;
0 commit comments