@@ -22,7 +22,6 @@ const { npmAddScriptSync } = require('./utils');
22
22
const templates = require ( '../templates' ) ;
23
23
const exampleTemplates = require ( '../templates/example' ) ;
24
24
25
- const DEFAULT_PREFIX = '' ;
26
25
const DEFAULT_PACKAGE_IDENTIFIER = 'com.reactlibrary' ;
27
26
const DEFAULT_PLATFORMS = [ 'android' , 'ios' ] ;
28
27
const DEFAULT_GITHUB_ACCOUNT = 'github_account' ;
@@ -47,14 +46,14 @@ const renderTemplateIfValid = (fs, root, template, templateArgs) => {
47
46
) ;
48
47
} ;
49
48
50
- const generateWithOptions = ( {
51
- name = 'unknown' , // (should be normalized)
52
- prefix = DEFAULT_PREFIX ,
53
- moduleName = 'unknown' , // (should be normalized)
54
- className = 'unknown' , // (should be normalized)
55
- modulePrefix = '' , // (should be normalized)
49
+ const generateWithNormalizedOptions = ( {
50
+ name,
51
+ prefix,
52
+ moduleName,
53
+ className,
54
+ modulePrefix,
56
55
packageIdentifier = DEFAULT_PACKAGE_IDENTIFIER ,
57
- namespace = 'unknown' , // (should be normalized)
56
+ namespace,
58
57
platforms = DEFAULT_PLATFORMS ,
59
58
githubAccount = DEFAULT_GITHUB_ACCOUNT ,
60
59
authorName = DEFAULT_AUTHOR_NAME ,
@@ -241,5 +240,7 @@ module.exports = function lib (options) {
241
240
? arguments [ 1 ]
242
241
: { } ;
243
242
244
- return generateWithOptions ( normalizedOptions ( options ) , ioImports ) ;
243
+ return generateWithNormalizedOptions (
244
+ normalizedOptions ( options ) ,
245
+ ioImports ) ;
245
246
} ;
0 commit comments