Skip to content

Commit 324efe0

Browse files
committed
extracting addons with flag -a or -addons improved
1 parent db3c16a commit 324efe0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/create-servest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-servest",
3-
"version": "1.2.0-beta.4",
3+
"version": "1.2.0-beta.5",
44
"type": "module",
55
"license": "MIT",
66
"author": "Rashedin Islam <https://www.rashedin.dev>",

packages/create-servest/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ async function init() {
201201
}
202202

203203
// 7️⃣ Running addons if specified
204-
const addons = addonsArg ? addonsArg.split(/\s+/).filter(Boolean) : [];
204+
// Start with the -a/-addons value (if any)
205+
let addons: string[] = addonsArg ? addonsArg.split(/\s+/).filter(Boolean) : [];
206+
207+
// Include any extra positional arguments after the project name
208+
addons = addons.concat(argv._.slice(1));
205209

206210
console.log('addons', addons);
207211

0 commit comments

Comments
 (0)