@nx-dotnet/core
Advanced tools
Comparing version 0.1.4-dev.6 to 0.1.4-dev.7
@@ -9,6 +9,6 @@ { | ||
"chokidar": "^3.5.1", | ||
"@nx-dotnet/dotnet": "0.1.4-dev.6", | ||
"@nx-dotnet/utils": "0.1.4-dev.6" | ||
"@nx-dotnet/dotnet": "0.1.4-dev.7", | ||
"@nx-dotnet/utils": "0.1.4-dev.7" | ||
}, | ||
"version": "0.1.4-dev.6" | ||
"version": "0.1.4-dev.7" | ||
} |
@@ -31,36 +31,42 @@ "use strict"; | ||
function GenerateTestProject(schema, host, dotnetClient, projectType) { | ||
const testName = schema.name + '-test'; | ||
const testRoot = schema.projectRoot + '-test'; | ||
const testProjectName = schema.projectName + '-test'; | ||
devkit_1.addProjectConfiguration(host, testProjectName, { | ||
root: testRoot, | ||
projectType: projectType, | ||
sourceRoot: `${testRoot}`, | ||
targets: { | ||
build: models_1.GetBuildExecutorConfiguration(testName), | ||
serve: models_1.GetServeExecutorConfig(), | ||
test: models_1.GetTestExecutorConfig() | ||
}, | ||
tags: schema.parsedTags, | ||
return tslib_1.__awaiter(this, void 0, void 0, function* () { | ||
const testName = schema.name + '-test'; | ||
const testRoot = schema.projectRoot + '-test'; | ||
const testProjectName = schema.projectName + '-test'; | ||
devkit_1.addProjectConfiguration(host, testProjectName, { | ||
root: testRoot, | ||
projectType: projectType, | ||
sourceRoot: `${testRoot}`, | ||
targets: { | ||
build: models_1.GetBuildExecutorConfiguration(testName), | ||
test: models_1.GetTestExecutorConfig() | ||
}, | ||
tags: schema.parsedTags, | ||
}); | ||
const newParams = [ | ||
{ | ||
flag: 'language', | ||
value: schema.language, | ||
}, | ||
{ | ||
flag: 'name', | ||
value: schema.className + '.Test', | ||
}, | ||
{ | ||
flag: 'output', | ||
value: schema.projectRoot + '-test', | ||
}, | ||
]; | ||
if (utils_1.isDryRun()) { | ||
newParams.push({ | ||
flag: 'dry-run', | ||
}); | ||
} | ||
dotnetClient.new(schema['test-template'], newParams); | ||
if (!utils_1.isDryRun()) { | ||
const testCsProj = yield utils_1.findProjectFileInPath(testRoot); | ||
const baseCsProj = yield utils_1.findProjectFileInPath(schema.projectRoot); | ||
dotnetClient.addProjectReference(testProjectName, schema.projectName); | ||
} | ||
}); | ||
const newParams = [ | ||
{ | ||
flag: 'language', | ||
value: schema.language, | ||
}, | ||
{ | ||
flag: 'name', | ||
value: schema.className + '.Test', | ||
}, | ||
{ | ||
flag: 'output', | ||
value: schema.projectRoot + '-test', | ||
}, | ||
]; | ||
if (utils_1.isDryRun()) { | ||
newParams.push({ | ||
flag: 'dry-run', | ||
}); | ||
} | ||
dotnetClient.new(schema['test-template'], newParams); | ||
} | ||
@@ -78,3 +84,3 @@ function GenerateProject(host, options, dotnetClient = new dotnet_1.DotNetClient(dotnet_1.dotnetFactory()), projectType) { | ||
serve: models_1.GetServeExecutorConfig(), | ||
test: options['test-framework'] | ||
test: options['test-template'] | ||
? models_1.GetTestExecutorConfig(normalizedOptions.projectName + '-test') | ||
@@ -106,3 +112,3 @@ : undefined, | ||
if (options['test-framework'] !== null) { | ||
GenerateTestProject(normalizedOptions, host, dotnetClient, projectType); | ||
yield GenerateTestProject(normalizedOptions, host, dotnetClient, projectType); | ||
} | ||
@@ -109,0 +115,0 @@ yield devkit_1.formatFiles(host); |
Sorry, the diff of this file is not supported yet
53280
1030
+ Added@nx-dotnet/dotnet@0.1.4-dev.7(transitive)
+ Added@nx-dotnet/utils@0.1.4-dev.7(transitive)
- Removed@nx-dotnet/dotnet@0.1.4-dev.6(transitive)
- Removed@nx-dotnet/utils@0.1.4-dev.6(transitive)
Updated@nx-dotnet/utils@0.1.4-dev.7