From 7cc4d13dbb3093d96c4eba3608e1e28da3f5d683 Mon Sep 17 00:00:00 2001 From: Mike North Date: Thu, 27 Sep 2018 17:23:22 -0700 Subject: [PATCH] feat: ember-cli support --- packages/import-utils/src/create-sandbox/templates.ts | 9 +++++++++ packages/types/index.d.ts | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/import-utils/src/create-sandbox/templates.ts b/packages/import-utils/src/create-sandbox/templates.ts index 06ec967f..1292f821 100644 --- a/packages/import-utils/src/create-sandbox/templates.ts +++ b/packages/import-utils/src/create-sandbox/templates.ts @@ -22,6 +22,11 @@ export function getMainFile(template: ITemplate) { return "src/pages/index.js"; } + if (template === "ember-cli") { + // Wildcard, because ember-cli is not specific on this + return "package.json"; + } + if (template === "nuxt") { // Wildcard, because nuxt is not specific on this return "package.json"; @@ -90,6 +95,10 @@ export function getTemplate( return "apollo"; } + if (totalDependencies.indexOf("ember-cli") > -1) { + return "ember-cli"; + } + if (totalDependencies.indexOf("sapper") > -1) { return "sapper"; } diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts index 4a5ce563..a3b125b5 100644 --- a/packages/types/index.d.ts +++ b/packages/types/index.d.ts @@ -36,7 +36,8 @@ export type ITemplate = | "next" | "reason" | "apollo" - | "sapper"; + | "sapper" + | "ember-cli"; export interface ISandbox { title: string;