Skip to content

Commit 8fb378c

Browse files
committed
refactor: move templates
1 parent 8e4107d commit 8fb378c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/create-react-native-library/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { createInitialGitCommit } from './utils/initialCommit';
1313
import { assertAnswers, assertNpx } from './utils/assert';
1414
import { resolveBobVersionWithFallback } from './utils/promiseWithFallback';
1515
import { generateTemplateConfiguration } from './config';
16-
import { applyTemplates } from './template/applyTemplates';
17-
import { createQuestions, type Answers } from './input';
16+
import { applyTemplates } from './template';
17+
import { createQuestions, type Answers, acceptedArgs } from './input';
1818

1919
const FALLBACK_BOB_VERSION = '0.32.0';
2020

@@ -334,7 +334,7 @@ async function create(_argv: yargs.Arguments<any>) {
334334
}
335335

336336
yargs
337-
.command('$0 [name]', 'create a react native library', args, create)
337+
.command('$0 [name]', 'create a react native library', acceptedArgs, create)
338338
.demandCommand()
339339
.recommendCommands()
340340
.fail((message, error) => {

packages/create-react-native-library/src/input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export type Question = Omit<
141141
name: keyof Answers;
142142
};
143143

144-
export const args: Record<ArgName, yargs.Options> = {
144+
export const acceptedArgs: Record<ArgName, yargs.Options> = {
145145
'slug': {
146146
description: 'Name of the npm package',
147147
type: 'string',

packages/create-react-native-library/src/template/applyTemplate.ts renamed to packages/create-react-native-library/src/template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'path';
22
import fs from 'fs-extra';
33
import ejs from 'ejs';
44
import type { TemplateConfiguration } from './config';
5-
import type { Answers } from 'create-react-native-library';
5+
import type { Answers } from './input';
66

77
const BINARIES = [
88
/(gradlew|\.(jar|keystore|png|jpg|gif))$/,

0 commit comments

Comments
 (0)