Skip to content

Commit 59a802f

Browse files
authored
Merge branch 'main' into feat/support-skip-note
2 parents 2cdd93a + c7c4713 commit 59a802f

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-rstack",
3-
"version": "1.4.0",
3+
"version": "1.4.2",
44
"description": "Create a new Rstack project",
55
"repository": {
66
"type": "git",

src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export type Argv = {
8080
template?: string;
8181
override?: boolean;
8282
tools?: string | string[];
83+
'package-name'?: string;
8384
};
8485

8586
function logHelpMessage(name: string, templates: string[]) {
@@ -93,6 +94,7 @@ function logHelpMessage(name: string, templates: string[]) {
9394
-t, --template specify the template to use
9495
--tools select additional tools (biome, eslint, prettier)
9596
--override override files in target directory
97+
--package-name specify the package name
9698
9799
Templates:
98100
@@ -108,6 +110,10 @@ async function getTools({ tools, dir, template }: Argv) {
108110
if (dir && template) {
109111
return [];
110112
}
113+
// skip tools selection when tools is empty string
114+
if (tools === '') {
115+
return [];
116+
}
111117

112118
return checkCancel<string[]>(
113119
await multiselect({
@@ -198,7 +204,9 @@ export async function create({
198204
}),
199205
);
200206

201-
const { targetDir, packageName } = formatProjectName(projectName);
207+
const formatted = formatProjectName(projectName);
208+
const { targetDir } = formatted;
209+
const packageName = argv['package-name'] || formatted.packageName;
202210
const distFolder = path.isAbsolute(targetDir)
203211
? targetDir
204212
: path.join(cwd, targetDir);

0 commit comments

Comments
 (0)