Browse Source

added Mobile app option

pull/2938/head
Yunus Emre Kalkan 7 years ago
parent
commit
c3cfa6b1ed
  1. 26
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs
  2. 5
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/AbpNuGetIndexUrlService.cs
  3. 12
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/MobileApp.cs

26
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs

@ -67,6 +67,12 @@ namespace Volo.Abp.Cli.Commands
Logger.LogInformation("UI Framework: " + uiFramework);
}
var mobileApp = GetMobilePreference(commandLineArgs);
if (uiFramework != UiFramework.NotSpecified)
{
Logger.LogInformation("Mobile App: " + mobileApp);
}
var gitHubLocalRepositoryPath = commandLineArgs.Options.GetOrNull(Options.GitHubLocalRepositoryPath.Long);
if (gitHubLocalRepositoryPath != null)
{
@ -208,6 +214,20 @@ namespace Volo.Abp.Cli.Commands
}
}
private MobileApp GetMobilePreference(CommandLineArgs commandLineArgs)
{
var optionValue = commandLineArgs.Options.GetOrNull(Options.Mobile.Short, Options.Mobile.Long);
switch (optionValue)
{
case "none":
return MobileApp.None;
case "react":
return MobileApp.ReactNative;
default:
return MobileApp.ReactNative;
}
}
public static class Options
{
public static class Template
@ -244,6 +264,12 @@ namespace Volo.Abp.Cli.Commands
public const string Short = "u";
public const string Long = "ui";
}
public static class Mobile
{
public const string Short = "m";
public const string Long = "mobile";
}
}
}
}

5
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/Services/AbpNuGetIndexUrlService.cs

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Cli.Licensing;

12
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/MobileApp.cs

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Volo.Abp.Cli.ProjectBuilding.Building
{
public enum MobileApp
{
None,
ReactNative
}
}
Loading…
Cancel
Save