Skip to content

Commit

Permalink
change the problem matcher and add argumrnts for all templates
Browse files Browse the repository at this point in the history
  • Loading branch information
akshita31 committed Jun 28, 2019
1 parent 0527580 commit 60ff49d
Showing 1 changed file with 24 additions and 36 deletions.
60 changes: 24 additions & 36 deletions src/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,52 +184,47 @@ export class AssetGenerator {
private createBuildTaskDescription(): tasks.TaskDescription {
let commandArgs = ['build'];

let buildProject = this.startupProject;
if (!buildProject) {
buildProject = this.fallbackBuildProject;
}
if (buildProject) {
const buildPath = path.join('${workspaceFolder}', path.relative(this.workspaceFolder.uri.fsPath, buildProject.Path));
commandArgs.push(util.convertNativePathToPosix(buildPath));
}
this.AddAdditionalCommandArgs(commandArgs);

return {
label: 'build',
command: 'dotnet',
type: 'process',
args: commandArgs,
// NOTE: The "$msCompile" matcher isn't the correct matcher for 'dotnet build' as it expects all
// file paths to be fully qualified. The tsc matcher seems to work as we would like.
problemMatcher: '$tsc'
problemMatcher: '$msCompile'
};
}


private createPublishTaskDescription(): tasks.TaskDescription {
let commandArgs = ['publish'];

let buildProject = this.startupProject;
if (!buildProject) {
buildProject = this.fallbackBuildProject;
}
if (buildProject) {
const buildPath = path.join('${workspaceFolder}', path.relative(this.workspaceFolder.uri.fsPath, buildProject.Path));
commandArgs.push(util.convertNativePathToPosix(buildPath));
}


this.AddAdditionalCommandArgs(commandArgs);

return {
label: 'publish',
command: 'dotnet',
type: 'process',
args: commandArgs,
// NOTE: The "$msCompile" matcher isn't the correct matcher for 'dotnet build' as it expects all
// file paths to be fully qualified. The tsc matcher seems to work as we would like.
problemMatcher: '$tsc'
problemMatcher: '$msCompile'
};
}

private createWatchTaskDescription(): tasks.TaskDescription {
let commandArgs = ['watch','run'];


this.AddAdditionalCommandArgs(commandArgs);

return {
label: 'watch',
command: 'dotnet',
type: 'process',
args: commandArgs,
problemMatcher: '$msCompile'
};
}

private AddAdditionalCommandArgs(commandArgs: string[]) {
let buildProject = this.startupProject;
if (!buildProject) {
buildProject = this.fallbackBuildProject;
Expand All @@ -239,17 +234,10 @@ export class AssetGenerator {
commandArgs.push(util.convertNativePathToPosix(buildPath));
}

return {
label: 'watch',
command: 'dotnet',
type: 'process',
args: commandArgs,
// NOTE: The "$msCompile" matcher isn't the correct matcher for 'dotnet build' as it expects all
// file paths to be fully qualified. The tsc matcher seems to work as we would like.
problemMatcher: '$tsc'
};
commandArgs.push("/property:GenerateFullPaths=true");
commandArgs.push("/consoleloggerparameters:NoSummary");
}

public createTasksConfiguration(): tasks.TaskConfiguration {
return {
version: "2.0.0",
Expand Down

0 comments on commit 60ff49d

Please sign in to comment.