Skip to content

Commit c103b6f

Browse files
committed
fix(init):use template option error
1 parent a56efcc commit c103b6f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,9 @@ async function init() {
322322
now: new Date().format('yyyy.MM.dd'),
323323
//@ts-ignore
324324
nowYear: new Date().format('yyyy'),
325-
framework: (framework.name || '').replace(/\S/, (str: string) => str.toUpperCase()),
325+
framework: (framework?.name ?? template ?? '').replace(/\S/, (str: string) =>
326+
str.toUpperCase(),
327+
),
326328
}
327329

328330
const write = (file: string, content?: string | NodeJS.ArrayBufferView) => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-chrome-ext",
3-
"version": "0.8.1",
3+
"version": "0.8.2",
44
"type": "module",
55
"description": "Scaffolding your chrome extension, multiple boilerplates supported!",
66
"author": "yalda",

0 commit comments

Comments
 (0)