Skip to content

Commit a0bf92a

Browse files
author
Christopher J. Brody
committed
Remove --override-prefix check
1 parent 137e91c commit a0bf92a

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

command.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = {
1212
const modulePrefix = options.modulePrefix;
1313
const packageIdentifier = options.packageIdentifier;
1414
const platforms = (options.platforms) ? options.platforms.split(',') : options.platforms;
15-
const overridePrefix = options.overridePrefix;
1615
const githubAccount = options.githubAccount;
1716
const authorName = options.authorName;
1817
const authorEmail = options.authorEmail;
@@ -27,7 +26,6 @@ module.exports = {
2726
modulePrefix,
2827
packageIdentifier,
2928
platforms,
30-
overridePrefix,
3129
githubAccount,
3230
authorName,
3331
authorEmail,
@@ -51,9 +49,6 @@ ${emoji.get('arrow_right')} To get started type \`cd ./${name}\` and run \`npm
5149
command: '--prefix [prefix]',
5250
description: 'The prefix for the library module (Default: `RN`)',
5351
default: 'RN',
54-
}, {
55-
command: '--override-prefix',
56-
description: 'Overrides the prefix check and allows the name to begin with uppercase characters',
5752
}, {
5853
command: '--module-prefix [modulePrefix]',
5954
description: 'The module prefix for the library module (Default: `react-native`)',

lib.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const DEFAULT_PREFIX = 'RN';
1212
const DEFAULT_MODULE_PREFIX = 'react-native';
1313
const DEFAULT_PACKAGE_IDENTIFIER = 'com.reactlibrary';
1414
const DEFAULT_PLATFORMS = ['android', 'ios'];
15-
const DEFAULT_OVERRIDE_PREFIX = false;
1615
const DEFAULT_GITHUB_ACCOUNT = 'github_account';
1716
const DEFAULT_AUTHOR_NAME = 'Your Name';
1817
const DEFAULT_AUTHOR_EMAIL = 'yourname@email.com';
@@ -40,25 +39,13 @@ module.exports = ({
4039
modulePrefix = DEFAULT_MODULE_PREFIX,
4140
packageIdentifier = DEFAULT_PACKAGE_IDENTIFIER,
4241
platforms = DEFAULT_PLATFORMS,
43-
overridePrefix = DEFAULT_OVERRIDE_PREFIX,
4442
githubAccount = DEFAULT_GITHUB_ACCOUNT,
4543
authorName = DEFAULT_AUTHOR_NAME,
4644
authorEmail = DEFAULT_AUTHOR_EMAIL,
4745
license = DEFAULT_LICENSE,
4846
view = false,
4947
generateExample = DEFAULT_GENERATE_EXAMPLE,
5048
}) => {
51-
if (!overridePrefix) {
52-
if (hasPrefix(name)) {
53-
throw new Error('Please don\'t include the prefix in the name');
54-
}
55-
56-
if (prefix === 'RCT') {
57-
throw new Error(`The \`RCT\` name prefix is reserved for core React modules.
58-
Please use a different prefix.`);
59-
}
60-
}
61-
6249
if (platforms.length === 0) {
6350
throw new Error('Please specify at least one platform to generate the library.');
6451
}

0 commit comments

Comments
 (0)