public SolutionModuleAdder( IJsonSerializer jsonSerializer, ProjectNugetPackageAdder projectNugetPackageAdder, DbContextFileBuilderConfigureAdder dbContextFileBuilderConfigureAdder, EfCoreMigrationManager efCoreMigrationManager, DerivedClassFinder derivedClassFinder, ProjectNpmPackageAdder projectNpmPackageAdder, NpmGlobalPackagesChecker npmGlobalPackagesChecker, IRemoteServiceExceptionHandler remoteServiceExceptionHandler, SourceCodeDownloadService sourceCodeDownloadService, SolutionFileModifier solutionFileModifier, NugetPackageToLocalReferenceConverter nugetPackageToLocalReferenceConverter, AngularSourceCodeAdder angularSourceCodeAdder, NewCommand newCommand, BundleCommand bundleCommand, CliHttpClientFactory cliHttpClientFactory) { JsonSerializer = jsonSerializer; ProjectNugetPackageAdder = projectNugetPackageAdder; DbContextFileBuilderConfigureAdder = dbContextFileBuilderConfigureAdder; EfCoreMigrationManager = efCoreMigrationManager; DerivedClassFinder = derivedClassFinder; ProjectNpmPackageAdder = projectNpmPackageAdder; NpmGlobalPackagesChecker = npmGlobalPackagesChecker; RemoteServiceExceptionHandler = remoteServiceExceptionHandler; SourceCodeDownloadService = sourceCodeDownloadService; SolutionFileModifier = solutionFileModifier; NugetPackageToLocalReferenceConverter = nugetPackageToLocalReferenceConverter; AngularSourceCodeAdder = angularSourceCodeAdder; NewCommand = newCommand; BundleCommand = bundleCommand; _cliHttpClientFactory = cliHttpClientFactory; Logger = NullLogger <SolutionModuleAdder> .Instance; }
private async Task RunBundleForBlazorAsync(string[] projectFiles, ModuleWithMastersInfo module) { var blazorProject = projectFiles.FirstOrDefault(f => f.EndsWith(".Blazor.csproj")); if (blazorProject == null || !module.NugetPackages.Any(np => np.Target == NuGetPackageTarget.Blazor)) { return; } // return if project is blazor-server var document = new XmlDocument(); document.Load(blazorProject); var sdk = document.DocumentElement.GetAttribute("Sdk"); if (sdk != BundlingConsts.SupportedWebAssemblyProjectType) { return; } await PublishEventAsync(10, $"Running bundle command for Blazor"); var args = new CommandLineArgs("bundle"); args.Options.Add(BundleCommand.Options.WorkingDirectory.Short, Path.GetDirectoryName(blazorProject)); args.Options.Add(BundleCommand.Options.ForceBuild.Short, string.Empty); await BundleCommand.ExecuteAsync(args); }
public AbpCliBundleAppService( BundleCommand bundleCommand, ICurrentDirectoryHelper currentDirectoryHelper) { _bundleCommand = bundleCommand; _currentDirectoryHelper = currentDirectoryHelper; }
protected virtual async Task RunBundleForBlazorAsync(string projectFile) { var args = new CommandLineArgs("bundle"); args.Options.Add(BundleCommand.Options.WorkingDirectory.Short, Path.GetDirectoryName(projectFile)); args.Options.Add(BundleCommand.Options.ForceBuild.Short, string.Empty); await BundleCommand.ExecuteAsync(args); }
public void Bundle_WithJustCommandButMissingFileName_ThrowsInvalidOperationException() { var command = new BundleCommand { Destination = "http://dummy/repo", }; Assert.Throws <InvalidOperationException>(() => Repo1.Bundle(command)); }
private async Task RunBundleForBlazorAsync(string[] projectFiles, ModuleWithMastersInfo module) { var blazorProject = projectFiles.FirstOrDefault(f => f.EndsWith(".Blazor.csproj")); if (blazorProject == null || !module.NugetPackages.Any(np => np.Target == NuGetPackageTarget.Blazor)) { return; } var args = new CommandLineArgs("bundle"); args.Options.Add(BundleCommand.Options.WorkingDirectory.Short, Path.GetDirectoryName(blazorProject)); args.Options.Add(BundleCommand.Options.ForceBuild.Short, string.Empty); await BundleCommand.ExecuteAsync(args); }
public ProjectNugetPackageAdder( IJsonSerializer jsonSerializer, ProjectNpmPackageAdder npmPackageAdder, DerivedClassFinder moduleClassFinder, ModuleClassDependcyAdder moduleClassDependcyAdder, IRemoteServiceExceptionHandler remoteServiceExceptionHandler, BundleCommand bundleCommand) { JsonSerializer = jsonSerializer; NpmPackageAdder = npmPackageAdder; ModuleClassFinder = moduleClassFinder; ModuleClassDependcyAdder = moduleClassDependcyAdder; RemoteServiceExceptionHandler = remoteServiceExceptionHandler; BundleCommand = bundleCommand; Logger = NullLogger <ProjectNugetPackageAdder> .Instance; }
public ProjectNugetPackageAdder( IJsonSerializer jsonSerializer, ProjectNpmPackageAdder npmPackageAdder, DerivedClassFinder moduleClassFinder, ModuleClassDependcyAdder moduleClassDependcyAdder, IRemoteServiceExceptionHandler remoteServiceExceptionHandler, BundleCommand bundleCommand, CliHttpClientFactory cliHttpClientFactory, SourceCodeDownloadService sourceCodeDownloadService, SolutionFileModifier solutionFileModifier) { JsonSerializer = jsonSerializer; NpmPackageAdder = npmPackageAdder; ModuleClassFinder = moduleClassFinder; ModuleClassDependcyAdder = moduleClassDependcyAdder; RemoteServiceExceptionHandler = remoteServiceExceptionHandler; BundleCommand = bundleCommand; SourceCodeDownloadService = sourceCodeDownloadService; SolutionFileModifier = solutionFileModifier; _cliHttpClientFactory = cliHttpClientFactory; Logger = NullLogger <ProjectNugetPackageAdder> .Instance; }
public void Bundle_WithJustCommandButMissingFileName_ThrowsInvalidOperationException() { var command = new BundleCommand { Destination = "http://dummy/repo", }; Assert.Throws<InvalidOperationException>(() => Repo1.Bundle(command)); }