File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
packages/core/src/generators/init Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,14 @@ import {
66 WorkspaceConfiguration ,
77 writeJson ,
88} from '@nrwl/devkit' ;
9+ import { DotNetClient , dotnetFactory } from '@nx-dotnet/dotnet' ;
910
1011import { CONFIG_FILE_PATH , NxDotnetConfig } from '@nx-dotnet/utils' ;
1112
12- export default async function ( host : Tree ) {
13+ export default async function (
14+ host : Tree ,
15+ dotnetClient = new DotNetClient ( dotnetFactory ( ) ) ,
16+ ) {
1317 const initialized = host . isFile ( CONFIG_FILE_PATH ) ;
1418
1519 const configObject : NxDotnetConfig = initialized
@@ -26,6 +30,8 @@ export default async function (host: Tree) {
2630 if ( ! initialized ) {
2731 updateGitIgnore ( host , readWorkspaceConfiguration ( host ) ) ;
2832 }
33+
34+ initToolManifest ( host , dotnetClient ) ;
2935}
3036
3137function updateGitIgnore (
@@ -59,3 +65,11 @@ function updateNxJson(host: Tree) {
5965 }
6066 writeJson ( host , 'nx.json' , nxJson ) ;
6167}
68+
69+ function initToolManifest ( host : Tree , dotnetClient : DotNetClient ) {
70+ const initialized = host . exists ( '.config/dotnet-tools.json' ) ;
71+ if ( ! initialized ) {
72+ console . log ( 'Tool Manifest created for managing local .NET tools' ) ;
73+ dotnetClient . new ( 'tool-manifest' ) ;
74+ }
75+ }
You can’t perform that action at this time.
0 commit comments