Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 941ae9a

Browse files
Add postActions to "dotnet new" templates
1 parent 3645ae6 commit 941ae9a

File tree

1 file changed

+14
-0
lines changed
  • templates/package-builder/src/build

1 file changed

+14
-0
lines changed

templates/package-builder/src/build/build.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,20 @@ function buildDotNetNewNuGetPackage() {
167167
}
168168
},
169169
tags: { language: 'C#', type: 'project' },
170+
postActions: [{
171+
condition: '(!skipRestore)',
172+
description: 'Restores NuGet packages required by this project.',
173+
manualInstructions: [{ text: 'Run \'dotnet restore\'' }],
174+
actionId: '210D431B-A78B-4D2F-B762-4ED3E3EA9025',
175+
continueOnError: true
176+
}, {
177+
condition: '(!skipRestore)',
178+
description: 'Restores NPM packages required by this project.',
179+
manualInstructions: [{ text: 'Run \'npm install\'' }],
180+
actionId: '3A7C4B45-1F5D-4A30-959A-51B88E82B5D2',
181+
args: { executable: 'npm', args: 'install' },
182+
continueOnError: false
183+
}],
170184
}, null, 2));
171185

172186
fs.writeFileSync(path.join(templateConfigDir, 'dotnetcli.host.json'), JSON.stringify({

0 commit comments

Comments
 (0)