You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix defaults & help text in command.js & README.md
- remove redundant default values
- add missing version specifier to README.md
- other improvements to consistency in README.md
- fix some defaults in the programmatic usage options
with the CLI help text in README.md adjusted by the following command:
node ./cli.js --help | sed 's/\[/</g' | sed 's/\]/>/g' | \
sed 's/\"/\`/g' | sed 's/default:/Default:/g'
--prefix <prefix> The prefix for the library (Default: ``)
63
+
-V, --version output the version number
64
+
--prefix <prefix> The prefix for the library module (Default: ``)
65
65
--module-name <moduleName> The module library package name to be used in package.json. Default: react-native-(name in param-case)
66
-
--module-prefix <modulePrefix> The module prefix for the library, ignored if --module-name is specified (Default: `react-native`)
66
+
--module-prefix <modulePrefix> The module prefix for the library module, ignored if --module-name is specified (Default: `react-native`)
67
67
--package-identifier <packageIdentifier> (Android only!) The package name for the Android module (Default: `com.reactlibrary`)
68
-
--platforms <platforms> Platforms the library will be created for. (comma separated; default: `ios,android`)
69
-
--github-account <github_account> The github account where the library is hosted (Default: `github_account`)
70
-
--author-name <name> The author's name (Default: `Your Name`)
71
-
--author-email <email> The author's email (Default: `yourname@email.com`)
72
-
--license <license> The license type of this library (Default: `Apache-2.0`)
73
-
--view Generate the module as a very simple native view component (Default: `false`)
74
-
--generate-example <shouldGenerate> Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally (Default: `false`)
68
+
--platforms <platforms> Platforms the library module will be created for - comma separated (Default: `ios,android`)
69
+
--github-account <githubAccount> The github account where the library module is hosted (Default: `github_account`)
70
+
--author-name <authorName> The author's name (Default: `Your Name`)
71
+
--author-email <authorEmail> The author's email (Default: `yourname@email.com`)
72
+
--license <license> The license type (Default: `Apache-2.0`)
73
+
--view Generate the module as a very simple native view component
74
+
--generate-example Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally
75
+
-h, --help output usage information
75
76
```
76
77
77
78
## Programmatic usage
@@ -91,7 +92,7 @@ createLibraryModule({
91
92
```javascript
92
93
{
93
94
name:String, /* The name of the library (Default: Library) */
94
-
prefix:String, /* The prefix for the library (Default: RN) */
95
+
prefix:String, /* The prefix for the library (Default: ``) */
95
96
moduleName:String, /* The module library package name to be used in package.json. Default: react-native-(name in param-case) */
96
97
modulePrefix:String, /* The module prefix for the library, ignored if moduleName is specified (Default: react-native) */
97
98
platforms:Array, /* Platforms the library will be created for. (Default: ['ios', 'android']) */
@@ -100,8 +101,8 @@ createLibraryModule({
100
101
authorName:String, /* The author's name (Default: `Your Name`) */
101
102
authorEmail:String, /* The author's email (Default: `yourname@email.com`) */
102
103
license:String, /* The license type of this library (Default: `Apache-2.0`) */
103
-
view:Boolean, /* Generate the module as a very simple native view component (Default: `false`) */
104
-
generateExample:Boolean, /* Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally (Default: `false`) */
104
+
view:Boolean, /* Generate the module as a very simple native view component (Default: false) */
105
+
generateExample:Boolean, /* Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally (Default: false) */
description: '(Android only!) The package name for the Android module (Default: `com.reactlibrary`)',
76
+
description: '(Android only!) The package name for the Android module',
77
77
default: 'com.reactlibrary',
78
78
},{
79
79
command: '--platforms <platforms>',
80
-
description: 'Platforms the library module will be created for. (comma separated; default: `ios,android`)',
80
+
description: 'Platforms the library module will be created for - comma separated',
81
81
default: 'ios,android',
82
82
},{
83
83
command: '--github-account [githubAccount]',
84
-
description: 'The github account where the library module is hosted (Default: `github_account`)',
84
+
description: 'The github account where the library module is hosted',
85
85
default: 'github_account',
86
86
},{
87
87
command: '--author-name [authorName]',
88
-
description: 'The author\'s name (Default: `Your Name`)',
88
+
description: 'The author\'s name',
89
89
default: 'Your Name',
90
90
},{
91
91
command: '--author-email [authorEmail]',
92
-
description: 'The author\'s email (Default: `yourname@email.com`)',
92
+
description: 'The author\'s email',
93
93
default: 'yourname@email.com',
94
94
},{
95
95
command: '--license [license]',
96
-
description: 'The license type (Default: `Apache-2.0`)',
96
+
description: 'The license type',
97
97
default: 'Apache-2.0',
98
98
},{
99
99
command: '--view',
100
-
description: 'Generate the module as a very simple native view component (Default: `false`)',
100
+
description: 'Generate the module as a very simple native view component',
101
101
},{
102
102
command: '--generate-example',
103
-
description: 'Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally (Default: `false`)',
103
+
description: 'Generate an example project and links the library module to it, requires both react-native-cli and yarn to be installed globally',
0 commit comments