Skip to content

Commit

Permalink
feat(nx): point to nx tutorial after running create-nx-workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Aug 29, 2019
1 parent e79731b commit b4e25fd
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion packages/create-nx-workspace/bin/create-nx-workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});
Expand Down Expand Up @@ -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`]
});
}
}

0 comments on commit b4e25fd

Please sign in to comment.