From ae9e6a534a63bac243b7e5ec9e5782f628f33ccb Mon Sep 17 00:00:00 2001 From: "yacheng.sz" Date: Thu, 16 Jan 2020 12:14:56 +0800 Subject: [PATCH 1/2] feat: add rax --- packages/import-utils/src/create-sandbox/templates.ts | 4 ++++ packages/types/index.d.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/import-utils/src/create-sandbox/templates.ts b/packages/import-utils/src/create-sandbox/templates.ts index f1af7c27..3b1f5504 100644 --- a/packages/import-utils/src/create-sandbox/templates.ts +++ b/packages/import-utils/src/create-sandbox/templates.ts @@ -164,6 +164,10 @@ export function getTemplate( return "preact-cli"; } + if (totalDependencies.indexOf("rax-cli") > -1) { + return "rax-cli"; + } + if (totalDependencies.indexOf("svelte") > -1) { return "svelte"; } diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts index f51b652c..35139b41 100644 --- a/packages/types/index.d.ts +++ b/packages/types/index.d.ts @@ -30,6 +30,7 @@ export type ITemplate = | "adonis" | "vue-cli" | "preact-cli" + | "rax-cli" | "svelte" | "create-react-app-typescript" | "create-react-app" From 1055f25188056ab2955d7589a8896ee835cf6412 Mon Sep 17 00:00:00 2001 From: "yacheng.sz" Date: Mon, 3 Feb 2020 10:22:29 +0800 Subject: [PATCH 2/2] feat: rename rax --- packages/import-utils/src/create-sandbox/templates.ts | 4 ++-- packages/types/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/import-utils/src/create-sandbox/templates.ts b/packages/import-utils/src/create-sandbox/templates.ts index 3b1f5504..86046c08 100644 --- a/packages/import-utils/src/create-sandbox/templates.ts +++ b/packages/import-utils/src/create-sandbox/templates.ts @@ -164,8 +164,8 @@ export function getTemplate( return "preact-cli"; } - if (totalDependencies.indexOf("rax-cli") > -1) { - return "rax-cli"; + if (totalDependencies.indexOf("rax") > -1) { + return "rax"; } if (totalDependencies.indexOf("svelte") > -1) { diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts index 35139b41..6c0896b5 100644 --- a/packages/types/index.d.ts +++ b/packages/types/index.d.ts @@ -30,7 +30,7 @@ export type ITemplate = | "adonis" | "vue-cli" | "preact-cli" - | "rax-cli" + | "rax" | "svelte" | "create-react-app-typescript" | "create-react-app"