mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
In dotnet new templates, only show "npm install" instruction when executing in CLI
This commit is contained in:
@@ -203,6 +203,10 @@ function buildDotNetNewNuGetPackage(packageId: string) {
|
||||
replaces: 'netcoreapp2.0',
|
||||
defaultValue: 'netcoreapp2.0'
|
||||
},
|
||||
HostIdentifier: {
|
||||
type: 'bind',
|
||||
binding: 'HostIdentifier'
|
||||
},
|
||||
skipRestore: {
|
||||
type: 'parameter',
|
||||
datatype: 'bool',
|
||||
@@ -236,6 +240,7 @@ function buildDotNetNewNuGetPackage(packageId: string) {
|
||||
// For the preview2 release, just display manual instructions instead.
|
||||
// This is only applicable on the command line, because VS will restore
|
||||
// NPM packages automatically by default.
|
||||
condition: '(HostIdentifier == "dotnetcli" || HostIdentifier == "dotnetcli-preview")',
|
||||
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',
|
||||
manualInstructions: [{ text: 'Run "npm install"' }]
|
||||
|
||||
Reference in New Issue
Block a user