diff --git a/lib/cli/src/detect.test.ts b/lib/cli/src/detect.test.ts index ae652a6a00d..e38d2ea8717 100644 --- a/lib/cli/src/detect.test.ts +++ b/lib/cli/src/detect.test.ts @@ -209,6 +209,16 @@ const MOCK_FRAMEWORK_FILES = [ }, }, }, + { + name: ProjectType.AURELIA, + files: { + 'package.json': { + dependencies: { + 'aurelia-bootstrapper': '1.0.0', + }, + }, + }, + }, ]; describe('Detect', () => { diff --git a/lib/cli/src/initiate.ts b/lib/cli/src/initiate.ts index fcde5281bc5..eb581225374 100644 --- a/lib/cli/src/initiate.ts +++ b/lib/cli/src/initiate.ts @@ -10,6 +10,7 @@ import { } from './project_types'; import { commandLog, codeLog, paddedLog } from './helpers'; import angularGenerator from './generators/ANGULAR'; +import aureliaGenerator from './generators/AURELIA'; import emberGenerator from './generators/EMBER'; import meteorGenerator from './generators/METEOR'; import reactGenerator from './generators/REACT'; @@ -217,6 +218,11 @@ const installStorybook = (projectType: ProjectType, options: CommandOptions): Pr .then(commandLog('Adding Storybook support to your "Rax" app')) .then(end); + case ProjectType.AURELIA: + return aureliaGenerator(packageManager, npmOptions, generatorOptions) + .then(commandLog('Adding Storybook support to your "Aurelia" app')) + .then(end); + default: paddedLog(`We couldn't detect your project type. (code: ${projectType})`); paddedLog( diff --git a/lib/cli/src/project_types.ts b/lib/cli/src/project_types.ts index 35cf14657a8..cfa00a35bd1 100644 --- a/lib/cli/src/project_types.ts +++ b/lib/cli/src/project_types.ts @@ -40,6 +40,7 @@ export enum ProjectType { PREACT = 'PREACT', SVELTE = 'SVELTE', RAX = 'RAX', + AURELIA = 'AURELIA', } export const SUPPORTED_FRAMEWORKS: SupportedFrameworks[] = [ @@ -56,6 +57,7 @@ export const SUPPORTED_FRAMEWORKS: SupportedFrameworks[] = [ 'preact', 'svelte', 'rax', + 'aurelia', ]; export enum StoryFormat { @@ -221,6 +223,13 @@ export const supportedTemplates: TemplateConfiguration[] = [ return dependencies.every(Boolean); }, }, + { + preset: ProjectType.AURELIA, + dependencies: ['aurelia-bootstrapper'], + matcherFunction: ({ dependencies }) => { + return dependencies.every(Boolean); + }, + }, ]; const notInstallableProjectTypes: ProjectType[] = [