You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 54ac222
Browse filesBrowse the repository at this point in the historyBrowse files
/// Constructs an instance of <see cref="AngularCliBuilder"/>.
21
25
/// </summary>
22
-
/// <param name="npmScriptName">The name of the script in your package.json file that builds the server-side bundle for your Angular application.</param>
23
-
publicAngularCliBuilder(stringnpmScriptName)
26
+
/// <param name="npmScript">The name of the script in your package.json file that builds the server-side bundle for your Angular application.</param>
27
+
publicAngularCliBuilder(stringnpmScript)
24
28
{
25
-
_npmScriptName=npmScriptName;
29
+
_npmScriptName=npmScript;
26
30
}
27
31
28
32
/// <inheritdoc />
29
33
publicTaskBuild(IApplicationBuilderapp)
30
34
{
31
-
// Locate the AngularCliMiddleware within the provided IApplicationBuilder
thrownewInvalidOperationException($"{nameof(AngularCliBuilder)} can only be used in an application configured with {nameof(SpaApplicationBuilderExtensions.UseSpa)}().");
38
39
}
39
-
else
40
+
41
+
if(string.IsNullOrEmpty(spaOptions.SourcePath))
40
42
{
41
-
thrownewException(
42
-
$"Cannot use {nameof(AngularCliBuilder)} unless you are also using"+
thrownewInvalidOperationException($"To use {nameof(AngularCliBuilder)}, you must supply a non-empty value for the {nameof(ISpaOptions.SourcePath)} property of {nameof(ISpaOptions)} when calling {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
/// <param name="sourcePath">The disk path, relative to the current directory, of the directory containing the SPA source files. When Angular CLI executes, this will be its working directory.</param>
24
-
/// <param name="npmScriptName">The name of the script in your package.json file that launches the Angular CLI process.</param>
23
+
/// <param name="npmScript">The name of the script in your package.json file that launches the Angular CLI process.</param>
thrownewException($"{nameof(UseAngularCliServer)} should be called inside the 'configue' callback of a call to {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
31
+
thrownewInvalidOperationException($"{nameof(UseAngularCliServer)} should be called inside the 'configure' callback of a call to {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
thrownewInvalidOperationException($"To use {nameof(UseAngularCliServer)}, you must supply a non-empty value for the {nameof(ISpaOptions.SourcePath)} property of {nameof(ISpaOptions)} when calling {nameof(SpaApplicationBuilderExtensions.UseSpa)}.");
thrownewException($"Only one usage of {nameof(SpaApplicationBuilderExtensions.UseSpa)} is allowed in any single branch of the middleware pipeline. This is because one instance would handle all requests.");
0 commit comments