In dotnet new templates, only show "npm install" instruction when executing in CLI

This commit is contained in:
Steve Sanderson
2017-06-11 19:28:51 +01:00
parent 9a59bccad9
commit 728b18431d

View File

@@ -203,6 +203,10 @@ function buildDotNetNewNuGetPackage(packageId: string) {
replaces: 'netcoreapp2.0', replaces: 'netcoreapp2.0',
defaultValue: 'netcoreapp2.0' defaultValue: 'netcoreapp2.0'
}, },
HostIdentifier: {
type: 'bind',
binding: 'HostIdentifier'
},
skipRestore: { skipRestore: {
type: 'parameter', type: 'parameter',
datatype: 'bool', datatype: 'bool',
@@ -236,6 +240,7 @@ function buildDotNetNewNuGetPackage(packageId: string) {
// For the preview2 release, just display manual instructions instead. // For the preview2 release, just display manual instructions instead.
// This is only applicable on the command line, because VS will restore // This is only applicable on the command line, because VS will restore
// NPM packages automatically by default. // NPM packages automatically by default.
condition: '(HostIdentifier == "dotnetcli" || HostIdentifier == "dotnetcli-preview")',
actionId: 'AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C', actionId: 'AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C',
description: '\n\n-------------------------------------------------------------------\nIMPORTANT: Before running this project on the command line,\n you must restore NPM packages by running "npm install"\n-------------------------------------------------------------------\n', description: '\n\n-------------------------------------------------------------------\nIMPORTANT: Before running this project on the command line,\n you must restore NPM packages by running "npm install"\n-------------------------------------------------------------------\n',
manualInstructions: [{ text: 'Run "npm install"' }] manualInstructions: [{ text: 'Run "npm install"' }]