From b4e25fdd2aad2f65ccf7e96db06fa66fa14e2fc5 Mon Sep 17 00:00:00 2001 From: Victor Savkin Date: Thu, 29 Aug 2019 15:44:56 -0400 Subject: [PATCH] feat(nx): point to nx tutorial after running create-nx-workspace --- .../bin/create-nx-workspace.ts | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/create-nx-workspace/bin/create-nx-workspace.ts b/packages/create-nx-workspace/bin/create-nx-workspace.ts index 1d9d7a3127b0f..c7b9f748b5387 100644 --- a/packages/create-nx-workspace/bin/create-nx-workspace.ts +++ b/packages/create-nx-workspace/bin/create-nx-workspace.ts @@ -64,8 +64,9 @@ determineWorkspaceName(parsedArgs).then(name => { return determineCli(preset, parsedArgs).then(cli => { const tmpDir = createSandbox(packageManager, cli); createApp(tmpDir, cli, parsedArgs, name, preset, appName, style); - showNxWarning(name); showCliWarning(preset, parsedArgs); + showNxWarning(name); + pointToTutorial(preset); }); }); }); @@ -417,3 +418,25 @@ function showCliWarning(preset: string, parsedArgs: any) { } } } + +function pointToTutorial(preset: string) { + if (preset === 'react' || preset === 'react-express') { + output.addVerticalSeparator(); + output.note({ + title: `First time using Nx? Check out this interactive Nx tutorial.`, + bodyLines: [`https://nx.dev/react/tutorial/01-create-application`] + }); + } else if (preset === 'angular' || preset === 'angular-nest') { + output.addVerticalSeparator(); + output.note({ + title: `First time using Nx? Check out this interactive Nx tutorial.`, + bodyLines: [`https://nx.dev/angular/tutorial/01-create-application`] + }); + } else if (preset === 'web-components') { + output.addVerticalSeparator(); + output.note({ + title: `First time using Nx? Check out this interactive Nx tutorial.`, + bodyLines: [`https://nx.dev/web/tutorial/01-create-application`] + }); + } +}