From d410e8059ced47fbaadc04536bb2595b03c04562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Fri, 21 Aug 2020 23:31:59 +0300 Subject: [PATCH 01/18] Introduce @abp/cropperjs npm package CropperJs script and style contributor are added --- .../CropperJs/CropperJsScriptContributor.cs | 13 +++++++++++++ .../Packages/CropperJs/CropperJsStyleContributor.cs | 13 +++++++++++++ npm/packs/cropperjs/abp.resourcemapping.js | 6 ++++++ npm/packs/cropperjs/package.json | 11 +++++++++++ 4 files changed, 43 insertions(+) create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsScriptContributor.cs create mode 100644 framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsStyleContributor.cs create mode 100644 npm/packs/cropperjs/abp.resourcemapping.js create mode 100644 npm/packs/cropperjs/package.json diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsScriptContributor.cs new file mode 100644 index 0000000000..fbfd19f765 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsScriptContributor.cs @@ -0,0 +1,13 @@ +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; +using System.Collections.Generic; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.CropperJs +{ + public class CropperJsScriptContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/cropperjs/js/cropper.min.js"); + } + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsStyleContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsStyleContributor.cs new file mode 100644 index 0000000000..1e6f78ff3f --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/CropperJs/CropperJsStyleContributor.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Volo.Abp.AspNetCore.Mvc.UI.Bundling; + +namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.CropperJs +{ + public class CropperJsStyleContributor : BundleContributor + { + public override void ConfigureBundle(BundleConfigurationContext context) + { + context.Files.AddIfNotContains("/libs/cropperjs/css/cropper.min.css"); + } + } +} \ No newline at end of file diff --git a/npm/packs/cropperjs/abp.resourcemapping.js b/npm/packs/cropperjs/abp.resourcemapping.js new file mode 100644 index 0000000000..68cc55b64e --- /dev/null +++ b/npm/packs/cropperjs/abp.resourcemapping.js @@ -0,0 +1,6 @@ +module.exports = { + mappings: { + "@node_modules/cropperjs/dist/cropper.min.js": "@libs/cropperjs/js/", + "@node_modules/cropperjs/dist/cropper.min.css": "@libs/cropperjs/css/" + } +} \ No newline at end of file diff --git a/npm/packs/cropperjs/package.json b/npm/packs/cropperjs/package.json new file mode 100644 index 0000000000..9ce511e71b --- /dev/null +++ b/npm/packs/cropperjs/package.json @@ -0,0 +1,11 @@ +{ + "version": "3.0.5", + "name": "@abp/cropperjs", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "cropperjs": "^1.5.7" + }, + "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431" +} From c043450d1da779e6665b167099a8efcf8b2d8789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Wed, 26 Aug 2020 21:00:14 +0300 Subject: [PATCH 02/18] Update abp.resourcemapping.js --- npm/packs/cropperjs/abp.resourcemapping.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/npm/packs/cropperjs/abp.resourcemapping.js b/npm/packs/cropperjs/abp.resourcemapping.js index 68cc55b64e..0a2f369710 100644 --- a/npm/packs/cropperjs/abp.resourcemapping.js +++ b/npm/packs/cropperjs/abp.resourcemapping.js @@ -1,6 +1,6 @@ module.exports = { - mappings: { - "@node_modules/cropperjs/dist/cropper.min.js": "@libs/cropperjs/js/", - "@node_modules/cropperjs/dist/cropper.min.css": "@libs/cropperjs/css/" - } -} \ No newline at end of file + mappings: { + "@node_modules/cropperjs/dist/cropper.min.js": "@libs/cropperjs/js/", + "@node_modules/cropperjs/dist/cropper.min.css": "@libs/cropperjs/css/", + }, +}; From 5ffcad5ef920731f78873ee9968ebd3e63387dd9 Mon Sep 17 00:00:00 2001 From: Erol Arkat Date: Thu, 27 Aug 2020 11:31:58 +0300 Subject: [PATCH 03/18] deprecated licenceUrl fix for nuget --- LICENSE => LICENSE.md | 0 common.props | 7 ++++--- nupkg/pack.ps1 | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) rename LICENSE => LICENSE.md (100%) diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/common.props b/common.props index 185ff859c9..4855f1cd9c 100644 --- a/common.props +++ b/common.props @@ -1,15 +1,16 @@ latest - 3.1.0-rc.2 + 3.1.0 $(NoWarn);CS1591 https://abp.io/assets/abp_nupkg.png - https://abp.io - https://github.com/abpframework/abp/blob/master/LICENSE + https://abp.io/ + LICENSE.md git https://github.com/abpframework/abp/ + \ No newline at end of file diff --git a/nupkg/pack.ps1 b/nupkg/pack.ps1 index 925e697300..8b593dd2a2 100644 --- a/nupkg/pack.ps1 +++ b/nupkg/pack.ps1 @@ -11,6 +11,8 @@ foreach($solution in $solutions) { foreach($project in $projects) { $projectFolder = Join-Path $rootFolder $project + + Copy-Item (Join-Path $rootFolder "LICENSE.md") -Destination $projectFolder # Create nuget pack Set-Location $projectFolder @@ -26,7 +28,8 @@ foreach($project in $projects) { $projectName = $project.Substring($project.LastIndexOf("/") + 1) $projectPackPath = Join-Path $projectFolder ("/bin/Release/" + $projectName + ".*.nupkg") Move-Item $projectPackPath $packFolder - + + Remove-Item (Join-Path $projectFolder "LICENSE.md") } # Go back to the pack folder From 51934a994925f69bb1c2e313eb396dcb52bac44a Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Thu, 27 Aug 2020 11:52:10 +0300 Subject: [PATCH 04/18] feat: add "Clear" to AbpUi localization resource --- framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json | 1 + framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json | 1 + 2 files changed, 2 insertions(+) diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json index a4fdf7afbd..d6f24833a9 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/en.json @@ -17,6 +17,7 @@ "Error": "Error", "AreYouSure": "Are you sure?", "Cancel": "Cancel", + "Clear": "Clear", "Yes": "Yes", "No": "No", "Ok": "Ok", diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json index bf558bb763..f4fffd3f7f 100644 --- a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/tr.json @@ -17,6 +17,7 @@ "Error": "Hata", "AreYouSure": "Emin misiniz?", "Cancel": "Vazgeç", + "Clear": "Temizle", "Yes": "Evet", "No": "Hayır", "Ok": "Tamam", From dd298f3301cc330a6817d7d5f2a59ac7ae9c03c0 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Thu, 27 Aug 2020 15:50:56 +0300 Subject: [PATCH 05/18] feat: accept __default as placeholder for default param --- .../packages/schematics/src/commands/api/index.ts | 4 +++- .../packages/schematics/src/commands/proxy/index.ts | 6 ++++-- npm/ng-packs/packages/schematics/src/utils/common.ts | 10 ++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/npm/ng-packs/packages/schematics/src/commands/api/index.ts b/npm/ng-packs/packages/schematics/src/commands/api/index.ts index 956e91e0b1..24e0f816af 100644 --- a/npm/ng-packs/packages/schematics/src/commands/api/index.ts +++ b/npm/ng-packs/packages/schematics/src/commands/api/index.ts @@ -23,13 +23,15 @@ import { getRootNamespace, interpolate, ModelGeneratorParams, + removeDefaultPlaceholders, resolveProject, serializeParameters, } from '../../utils'; import * as cases from '../../utils/text'; import { Schema as GenerateProxySchema } from './schema'; -export default function(params: GenerateProxySchema) { +export default function(schema: GenerateProxySchema) { + const params = removeDefaultPlaceholders(schema); const moduleName = strings.camelize(params.module || 'app'); return chain([ diff --git a/npm/ng-packs/packages/schematics/src/commands/proxy/index.ts b/npm/ng-packs/packages/schematics/src/commands/proxy/index.ts index d597f720cd..ddbbd68caa 100644 --- a/npm/ng-packs/packages/schematics/src/commands/proxy/index.ts +++ b/npm/ng-packs/packages/schematics/src/commands/proxy/index.ts @@ -13,11 +13,13 @@ import { createApiDefinitionSaver, getApiDefinition, getSourceUrl, + removeDefaultPlaceholders, resolveProject, } from '../../utils'; import { Schema as GenerateProxySchema } from './schema'; -export default function(params: GenerateProxySchema) { +export default function(schema: GenerateProxySchema) { + const params = removeDefaultPlaceholders(schema); const moduleName = strings.camelize(params.module || 'app'); return chain([ @@ -32,7 +34,7 @@ export default function(params: GenerateProxySchema) { data, `${targetPath}/shared/api-definition.json`, ); - const createApi = schematic('api', params); + const createApi = schematic('api', schema); return branchAndMerge(chain([saveApiDefinition, createApi])); }, diff --git a/npm/ng-packs/packages/schematics/src/utils/common.ts b/npm/ng-packs/packages/schematics/src/utils/common.ts index 8a5aa5fd93..ff01bd27c5 100644 --- a/npm/ng-packs/packages/schematics/src/utils/common.ts +++ b/npm/ng-packs/packages/schematics/src/utils/common.ts @@ -23,3 +23,13 @@ export function readFileInTree(tree: Tree, filePath: string): ts.SourceFile { const text = buffer.toString('utf-8'); return ts.createSourceFile(filePath, text, ts.ScriptTarget.Latest, true); } + +export function removeDefaultPlaceholders(oldParams: T) { + const newParams: Record = {}; + + Object.entries(oldParams).forEach(([key, value]) => { + newParams[key] = value === '__default' ? undefined : value; + }); + + return newParams as T; +} From d3f0f3c603663a05a74be4bda32528baac5232c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 15:52:44 +0300 Subject: [PATCH 06/18] Update POST.md --- .../POST.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md b/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md index e0543fb915..d16540872f 100644 --- a/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md +++ b/docs/en/Blog-Posts/2020-09-07 Angular-Service-Proxies/POST.md @@ -26,34 +26,34 @@ dotnet tool update -g Volo.Abp.Cli > If you've created your project with version 3.1 or later, you can skip this part since it will be already installed in your solution. -For the solution was created before v3.1, follow the steps below to configure your angular project: +For a solution that was created before v3.1, follow the steps below to configure the angular application: -* Add `@abp/ng.schematics` package to the `devDependencies` of the Angular project (run the following command in the root folder of the angular application): +* Add `@abp/ng.schematics` package to the `devDependencies` of the Angular project. Run the following command in the root folder of the angular application: ````bash npm install @abp/ng.schematics --save-dev ```` -- Add `rootNamespace` entry into the `/apis/default/` section in the `/src/environments/environment.ts`, as shown below: +- Add `rootNamespace` entry into the `apis/default` section in the `/src/environments/environment.ts`, as shown below: ```json apis: { default: { ... - rootNamespace: 'Acme.BookStore' //<-- ADD THIS + rootNamespace: 'Acme.BookStore' }, } ``` -`Acme.BookStore` should be replaced by the root namespace of your .NET project. This ensures to not create unnecessary nested folders while creating the service proxy code. +`Acme.BookStore` should be replaced by the root namespace of your .NET project. This ensures to not create unnecessary nested folders while creating the service proxy code. This value is `AngularProxyDemo` for the example solution explained below. ## Basic Usage ### Project Creation -Assuming you've created your project with the Angular UI. +> If you already have a solution, you can skip this section. -Example (using the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI)): +You need to [create](https://abp.io/get-started) your solution with the Angular UI. You can use the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) to create a new solution: ````bash abp new AngularProxyDemo -u angular @@ -63,7 +63,7 @@ abp new AngularProxyDemo -u angular The backend application must be up and running to be able to use the service proxy code generation system. -> See the [getting started](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) guide if you don't know how create and to run the project. +> See the [getting started](https://docs.abp.io/en/abp/latest/Getting-Started?UI=NG&DB=EF&Tiered=No) guide if you don't know details of creating and running the solution. ### Backend @@ -124,13 +124,13 @@ It simply returns a list of books. You probably want to get the books from a dat ### HTTP API -Thanks to the conventional API controllers system of the ABP Framework, we don't have too develop API controllers manually. Just **run the backend (*HttpApi.Host*) application** that shows the [Swagger UI](https://swagger.io/tools/swagger-ui/) by default. You will see the GET API for the books: +Thanks to the [auto API controllers](https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers) system of the ABP Framework, we don't have to develop API controllers manually. Just **run the backend (*HttpApi.Host*) application** that shows the [Swagger UI](https://swagger.io/tools/swagger-ui/) by default. You will see the **GET** API for the books: ![swagger-book-list](swagger-book-list.png) ### Service Proxy Generation -Open a command line in the root folder of the Angular application and execute the following command: +Open a **command line** in the **root folder of the Angular application** and execute the following command: ````bash abp generate-proxy From 32b3fded5733b1496f48e3629fd8841f132fcf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 16:06:58 +0300 Subject: [PATCH 07/18] GenerateProxyCommand should pass __default for unset options. --- .../Abp/Cli/Commands/AddPackageCommand.cs | 1 - .../Abp/Cli/Commands/GenerateProxyCommand.cs | 43 +++++++++++++++---- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs index 7ea20eccf4..36530a7979 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/AddPackageCommand.cs @@ -115,7 +115,6 @@ namespace Volo.Abp.Cli.Commands throw new CliUsageException(sb.ToString()); } - public static class Options { public static class Project diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs index ab680ce4b8..fa605bdce7 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs @@ -2,7 +2,6 @@ using System; using System.IO; using System.Text; using System.Threading.Tasks; -using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Utils; @@ -17,7 +16,11 @@ namespace Volo.Abp.Cli.Commands CheckAngularJsonFile(); CheckNgSchematics(); - CmdHelper.RunCmd("npx ng g @abp/ng.schematics:proxy"); + var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? "__default"; + var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long) ?? "__default"; + var target = commandLineArgs.Options.GetOrNull(Options.Target.Short, Options.Target.Long) ?? "__default"; + + CmdHelper.RunCmd($"npx ng g @abp/ng.schematics:proxy --module {module} --source {source} --target {target}"); return Task.CompletedTask; } @@ -29,20 +32,21 @@ namespace Volo.Abp.Cli.Commands if (!File.Exists(packageJsonPath)) { throw new CliUsageException( - "package.json file not found" + - Environment.NewLine + - GetUsageInfo() + "package.json file not found" + + Environment.NewLine + + GetUsageInfo() ); } - var schematicsPackageNode = (string) JObject.Parse(File.ReadAllText(packageJsonPath))["devDependencies"]?["@abp/ng.schematics"]; + var schematicsPackageNode = + (string) JObject.Parse(File.ReadAllText(packageJsonPath))["devDependencies"]?["@abp/ng.schematics"]; if (schematicsPackageNode == null) { throw new CliUsageException( - "\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!" + - Environment.NewLine + - GetUsageInfo() + "\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!" + + Environment.NewLine + + GetUsageInfo() ); } } @@ -82,5 +86,26 @@ namespace Volo.Abp.Cli.Commands { return "Generates Angular service proxies and DTOs to consume HTTP APIs."; } + + public static class Options + { + public static class Module + { + public const string Short = "m"; + public const string Long = "module"; + } + + public static class Source + { + public const string Short = "s"; + public const string Long = "source"; + } + + public static class Target + { + public const string Short = "t"; + public const string Long = "target"; + } + } } } From f4ad9b9eab9086649a3b13503fab9182efa0f81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 16:22:23 +0300 Subject: [PATCH 08/18] Add prompt parameter to the GenerateProxyCommand --- .../Abp/Cli/Commands/GenerateProxyCommand.cs | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs index fa605bdce7..5e88417b4a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs @@ -16,11 +16,31 @@ namespace Volo.Abp.Cli.Commands CheckAngularJsonFile(); CheckNgSchematics(); - var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? "__default"; - var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long) ?? "__default"; - var target = commandLineArgs.Options.GetOrNull(Options.Target.Short, Options.Target.Long) ?? "__default"; + var prompt = commandLineArgs.Options.ContainsKey("p") || commandLineArgs.Options.ContainsKey("prompt"); + var defaultValue = prompt ? null : "__default"; - CmdHelper.RunCmd($"npx ng g @abp/ng.schematics:proxy --module {module} --source {source} --target {target}"); + var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? defaultValue; + var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long) ?? defaultValue; + var target = commandLineArgs.Options.GetOrNull(Options.Target.Short, Options.Target.Long) ?? defaultValue; + + var commandBuilder = new StringBuilder("npx ng g @abp/ng.schematics:proxy"); + + if (module != null) + { + commandBuilder.Append($" --module {module}"); + } + + if (source != null) + { + commandBuilder.Append($" --source {source}"); + } + + if (target != null) + { + commandBuilder.Append($" --target {target}"); + } + + CmdHelper.RunCmd(commandBuilder.ToString()); return Task.CompletedTask; } @@ -73,9 +93,12 @@ namespace Volo.Abp.Cli.Commands sb.AppendLine(""); sb.AppendLine(" abp generate-proxy"); sb.AppendLine(""); - sb.AppendLine("Examples:"); + sb.AppendLine("Options:"); sb.AppendLine(""); - sb.AppendLine(" abp generate-proxy"); + sb.AppendLine("-m|--module (default: 'app') The name of the backend module you wish to generate proxies for."); + sb.AppendLine("-s|--source (default: 'defaultProject') Angular project name to resolve the root namespace & API definition URL from."); + sb.AppendLine("-t|--target (default: 'defaultProject') Angular project name to place generated code in."); + sb.AppendLine("-p|--prompt Asks the options from the command line prompt (for the missing options)"); sb.AppendLine(""); sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI"); @@ -106,6 +129,12 @@ namespace Volo.Abp.Cli.Commands public const string Short = "t"; public const string Long = "target"; } + + public static class Prompt + { + public const string Short = "p"; + public const string Long = "prompt"; + } } } } From ee718ffb3a6a7f6464dc4c37a0a4e3deea751d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 16:34:13 +0300 Subject: [PATCH 09/18] Resolved #5205: Add "--skip-cli-version-check" option to ABP CLI. --- docs/en/CLI.md | 6 ++++++ .../src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/en/CLI.md b/docs/en/CLI.md index 99808c3ba5..ff828b91a3 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -16,6 +16,12 @@ To update an existing installation: dotnet tool update -g Volo.Abp.Cli ```` +## Global Options + +While each command may have a set of options, there are some global options those can be used with any command; + +* `--skip-cli-version-check`: Skips to check the latest version of the ABP CLI. If you don't specify, it will check the latest version and shows a warning message if there is a newer version of the ABP CLI. + ## Commands Here, the list of all available commands before explaining their details: diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs index ef6eb79042..a984d79771 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs @@ -41,9 +41,13 @@ namespace Volo.Abp.Cli { Logger.LogInformation("ABP CLI (https://abp.io)"); - await CheckCliVersionAsync(); - var commandLineArgs = CommandLineArgumentParser.Parse(args); + + if (!commandLineArgs.Options.ContainsKey("skip-cli-version-check")) + { + await CheckCliVersionAsync(); + } + var commandType = CommandSelector.Select(commandLineArgs); using (var scope = ServiceScopeFactory.CreateScope()) @@ -72,7 +76,7 @@ namespace Volo.Abp.Cli var currentCliVersion = await GetCurrentCliVersion(assembly); var updateChannel = GetUpdateChannel(currentCliVersion); - Logger.LogInformation($"Version {currentCliVersion} ({updateChannel} channel)"); + Logger.LogInformation($"Version {currentCliVersion} ({updateChannel})"); try { From 28b13d3af39598bde9644f7e5d871a5fcf3eced4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 16:35:48 +0300 Subject: [PATCH 10/18] Add options to GenerateProxyCommand --- .../Abp/Cli/Commands/GenerateProxyCommand.cs | 76 ++++++++++++++++--- 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs index ab680ce4b8..5e88417b4a 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GenerateProxyCommand.cs @@ -2,7 +2,6 @@ using System; using System.IO; using System.Text; using System.Threading.Tasks; -using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Volo.Abp.Cli.Args; using Volo.Abp.Cli.Utils; @@ -17,7 +16,31 @@ namespace Volo.Abp.Cli.Commands CheckAngularJsonFile(); CheckNgSchematics(); - CmdHelper.RunCmd("npx ng g @abp/ng.schematics:proxy"); + var prompt = commandLineArgs.Options.ContainsKey("p") || commandLineArgs.Options.ContainsKey("prompt"); + var defaultValue = prompt ? null : "__default"; + + var module = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.Module.Long) ?? defaultValue; + var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long) ?? defaultValue; + var target = commandLineArgs.Options.GetOrNull(Options.Target.Short, Options.Target.Long) ?? defaultValue; + + var commandBuilder = new StringBuilder("npx ng g @abp/ng.schematics:proxy"); + + if (module != null) + { + commandBuilder.Append($" --module {module}"); + } + + if (source != null) + { + commandBuilder.Append($" --source {source}"); + } + + if (target != null) + { + commandBuilder.Append($" --target {target}"); + } + + CmdHelper.RunCmd(commandBuilder.ToString()); return Task.CompletedTask; } @@ -29,20 +52,21 @@ namespace Volo.Abp.Cli.Commands if (!File.Exists(packageJsonPath)) { throw new CliUsageException( - "package.json file not found" + - Environment.NewLine + - GetUsageInfo() + "package.json file not found" + + Environment.NewLine + + GetUsageInfo() ); } - var schematicsPackageNode = (string) JObject.Parse(File.ReadAllText(packageJsonPath))["devDependencies"]?["@abp/ng.schematics"]; + var schematicsPackageNode = + (string) JObject.Parse(File.ReadAllText(packageJsonPath))["devDependencies"]?["@abp/ng.schematics"]; if (schematicsPackageNode == null) { throw new CliUsageException( - "\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!" + - Environment.NewLine + - GetUsageInfo() + "\"@abp/ng.schematics\" NPM package should be installed to the devDependencies before running this command!" + + Environment.NewLine + + GetUsageInfo() ); } } @@ -69,9 +93,12 @@ namespace Volo.Abp.Cli.Commands sb.AppendLine(""); sb.AppendLine(" abp generate-proxy"); sb.AppendLine(""); - sb.AppendLine("Examples:"); + sb.AppendLine("Options:"); sb.AppendLine(""); - sb.AppendLine(" abp generate-proxy"); + sb.AppendLine("-m|--module (default: 'app') The name of the backend module you wish to generate proxies for."); + sb.AppendLine("-s|--source (default: 'defaultProject') Angular project name to resolve the root namespace & API definition URL from."); + sb.AppendLine("-t|--target (default: 'defaultProject') Angular project name to place generated code in."); + sb.AppendLine("-p|--prompt Asks the options from the command line prompt (for the missing options)"); sb.AppendLine(""); sb.AppendLine("See the documentation for more info: https://docs.abp.io/en/abp/latest/CLI"); @@ -82,5 +109,32 @@ namespace Volo.Abp.Cli.Commands { return "Generates Angular service proxies and DTOs to consume HTTP APIs."; } + + public static class Options + { + public static class Module + { + public const string Short = "m"; + public const string Long = "module"; + } + + public static class Source + { + public const string Short = "s"; + public const string Long = "source"; + } + + public static class Target + { + public const string Short = "t"; + public const string Long = "target"; + } + + public static class Prompt + { + public const string Short = "p"; + public const string Long = "prompt"; + } + } } } From 43c18d0322cf3c1fc60495233383cc4e961c7171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 16:45:14 +0300 Subject: [PATCH 11/18] Added Conclusion section --- .../Using-DevExtreme-In-ABP-Based-Application.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md b/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md index 1b2c2b3e33..c62db89fc0 100644 --- a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md +++ b/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md @@ -1,9 +1,11 @@ ## Using DevExtreme with ABP Based Applications -Hi, in this step by step article, I will show you how to integrate DevExtreme components into ABP Framework based applications. +Hi, in this step by step article, I will show you how to integrate [DevExtreme](https://js.devexpress.com/) components into ABP Framework based applications. ![both-example-result](both-example-result.png) +*(A screenshot from the example application developed in this article)* + ## Create the Project ABP Framework offers startup templates to get into the business faster. We can download a new startup template using [ABP CLI](https://docs.abp.io/en/abp/latest/CLI): @@ -300,3 +302,7 @@ Html.DevExtreme().DataGrid() .Key("OrderID") ) ``` + +## Conclusion + +In this article, I've explained how to use [DevExtreme](https://js.devexpress.com/) components in your application. ABP Framework is designed so that it can work with any UI library/framework. \ No newline at end of file From df7cd0ebad9aff27d20dbef4dce6be6f8add22e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 16:46:13 +0300 Subject: [PATCH 12/18] Update Using-DevExtreme-In-ABP-Based-Application.md --- .../Using-DevExtreme-In-ABP-Based-Application.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md b/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md index c62db89fc0..19cac81e76 100644 --- a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md +++ b/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md @@ -1,4 +1,4 @@ -## Using DevExtreme with ABP Based Applications +## Using DevExtreme Componenets With the ABP Fremework Hi, in this step by step article, I will show you how to integrate [DevExtreme](https://js.devexpress.com/) components into ABP Framework based applications. @@ -305,4 +305,4 @@ Html.DevExtreme().DataGrid() ## Conclusion -In this article, I've explained how to use [DevExtreme](https://js.devexpress.com/) components in your application. ABP Framework is designed so that it can work with any UI library/framework. \ No newline at end of file +In this article, I've explained how to use [DevExtreme](https://js.devexpress.com/) components in your application. ABP Framework is designed so that it can work with any UI library/framework. From 8d03319c9ebfd9461e3e758ed4faa266cd454b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 17:27:02 +0300 Subject: [PATCH 13/18] Set dependencies and versions. --- npm/packs/cropperjs/package.json | 3 ++- npm/packs/luxon/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/npm/packs/cropperjs/package.json b/npm/packs/cropperjs/package.json index 9ce511e71b..6255727a26 100644 --- a/npm/packs/cropperjs/package.json +++ b/npm/packs/cropperjs/package.json @@ -1,10 +1,11 @@ { - "version": "3.0.5", + "version": "~3.1.0-rc.2", "name": "@abp/cropperjs", "publishConfig": { "access": "public" }, "dependencies": { + "@abp/core": "~3.1.0-rc.2", "cropperjs": "^1.5.7" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431" diff --git a/npm/packs/luxon/package.json b/npm/packs/luxon/package.json index de348d7b21..b26f1b6ba6 100644 --- a/npm/packs/luxon/package.json +++ b/npm/packs/luxon/package.json @@ -5,7 +5,7 @@ "access": "public" }, "dependencies": { - "@abp/core": "~3.0.5", + "@abp/core": "~3.1.0-rc.2", "luxon": "^1.24.1" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431" From 9b95e6d398fe1a2cfddaf3fdc7eee72ad13b8177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 17:28:33 +0300 Subject: [PATCH 14/18] Fix version --- npm/packs/cropperjs/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/packs/cropperjs/package.json b/npm/packs/cropperjs/package.json index 6255727a26..0895ebcace 100644 --- a/npm/packs/cropperjs/package.json +++ b/npm/packs/cropperjs/package.json @@ -1,11 +1,11 @@ { - "version": "~3.1.0-rc.2", + "version": "~3.0.5", "name": "@abp/cropperjs", "publishConfig": { "access": "public" }, "dependencies": { - "@abp/core": "~3.1.0-rc.2", + "@abp/core": "~3.0.5", "cropperjs": "^1.5.7" }, "gitHead": "bb4ea17d5996f01889134c138d00b6c8f858a431" From 7db0f4fe9ceb3b20950004bd5cd8ac69529cc432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 17:30:28 +0300 Subject: [PATCH 15/18] Fix version --- npm/packs/cropperjs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/packs/cropperjs/package.json b/npm/packs/cropperjs/package.json index 0895ebcace..9764f89545 100644 --- a/npm/packs/cropperjs/package.json +++ b/npm/packs/cropperjs/package.json @@ -1,5 +1,5 @@ { - "version": "~3.0.5", + "version": "3.0.5", "name": "@abp/cropperjs", "publishConfig": { "access": "public" From f5594ec3973a9991f6c590806f36eaaeb8c37fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yekta=20Burcu=20G=C3=B6kta=C5=9F?= <58883990+YektaGoktas@users.noreply.github.com> Date: Thu, 27 Aug 2020 17:40:31 +0300 Subject: [PATCH 16/18] Update Using-DevExtreme-In-ABP-Based-Application.md Some grammatical correctness. --- .../Using-DevExtreme-In-ABP-Based-Application.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md b/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md index 19cac81e76..eb93041228 100644 --- a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md +++ b/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md @@ -1,6 +1,6 @@ -## Using DevExtreme Componenets With the ABP Fremework +## Using DevExtreme Components With the ABP Fremework -Hi, in this step by step article, I will show you how to integrate [DevExtreme](https://js.devexpress.com/) components into ABP Framework based applications. +Hi, in this step by step article, I will show you how to integrate [DevExtreme](https://js.devexpress.com/) components into ABP Framework-based applications. ![both-example-result](both-example-result.png) @@ -153,7 +153,7 @@ namespace DevExtremeSample.Web.Bundling } ``` -As you see, the `DevExtremeScriptContributor` is depends on `JQueryScriptContributor` which adds JQuery related files before the DevExpress packages (see the [bundling system](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Bundling-Minification) for details). +As you see, the `DevExtremeScriptContributor` depends on `JQueryScriptContributor` which adds JQuery related files before the DevExpress packages (see the [bundling system](https://docs.abp.io/en/abp/latest/UI/AspNetCore/Bundling-Minification) for details). #### Create DevExtremeJsViewComponent @@ -186,7 +186,7 @@ namespace DevExtremeSample.Web.Components.DevExtremeJs ``` -Your final Web project should be like as the following: +Your final Web project should be like the following: ![devextreme-js](devextreme-js.png) @@ -206,7 +206,7 @@ Configure(options => #### Known Issue: Uncaught TypeError: MutationObserver.observe: Argument 1 is not an object. -> This issue does exists in the ABP Framework v3.0 and earlier versions. If you are using ABP Framework v3.1 or a latter version, you can skip this section. +> This issue does exist in the ABP Framework v3.0 and earlier versions. If you are using ABP Framework v3.1 or a later version, you can skip this section. When you run your `*.Web` project, you will see an exception (`Uncaught TypeError: MutationObserver.observe: Argument 1 is not an object.`) at your console. @@ -267,7 +267,7 @@ I've used an in-memory list to store data for this example, instead of a real da #### JSON Serialization -You can see some `JsonProperty` attributes on the DTO properties. I uses these attributes because DevExtreme example expects `PascalCase` property names in the serialized JSON that is sent to the client. But ABP Framework & ASP.NET Core conventionally uses `camelCase` property names on JSON serialization. Adding these `JsonProperty` attributes ensures that the related properties are serialized as `PascalCase`. +You can see some `JsonProperty` attributes on the DTO properties. I use these attributes because DevExtreme example expects `PascalCase` property names in the serialized JSON that is sent to the client. But ABP Framework & ASP.NET Core conventionally uses `camelCase` property names on JSON serialization. Adding these `JsonProperty` attributes ensures that the related properties are serialized as `PascalCase`. #### DevExtreme Components vs Application Service Methods From d874b4d927aac9a502523252d6946c8b7b962911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Thu, 27 Aug 2020 17:59:40 +0300 Subject: [PATCH 17/18] File Rename --- ...DevExtreme-Components-With-The-ABP-Fremework.md} | 0 .../both-example-result.png | Bin .../data-grid-app-contract.png | Bin .../data-grid-application.png | Bin .../data-grid-final.png | Bin .../data-grid-web.png | Bin .../devexp-result.gif | Bin .../devextreme-js.png | Bin .../gulp.png | Bin .../initial-project.png | Bin .../tree-list-app-contract.png | Bin .../tree-list-application.png | Bin .../tree-list-final.png | Bin .../tree-list-web.png | Bin .../wwwroot-lib.png | Bin 15 files changed, 0 insertions(+), 0 deletions(-) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/Using-DevExtreme-Components-With-The-ABP-Fremework.md} (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/both-example-result.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/data-grid-app-contract.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/data-grid-application.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/data-grid-final.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/data-grid-web.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/devexp-result.gif (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/devextreme-js.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/gulp.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/initial-project.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/tree-list-app-contract.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/tree-list-application.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/tree-list-final.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/tree-list-web.png (100%) rename docs/en/Community-Articles/{2020-08-18-DevExtreme-With-ABP => 2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework}/wwwroot-lib.png (100%) diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/Using-DevExtreme-Components-With-The-ABP-Fremework.md similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/Using-DevExtreme-In-ABP-Based-Application.md rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/Using-DevExtreme-Components-With-The-ABP-Fremework.md diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/both-example-result.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/both-example-result.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/both-example-result.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/both-example-result.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-app-contract.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-app-contract.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-app-contract.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-app-contract.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-application.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-application.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-application.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-application.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-final.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-final.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-final.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-final.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-web.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-web.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/data-grid-web.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/data-grid-web.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/devexp-result.gif b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/devexp-result.gif similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/devexp-result.gif rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/devexp-result.gif diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/devextreme-js.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/devextreme-js.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/devextreme-js.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/devextreme-js.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/gulp.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/gulp.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/gulp.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/gulp.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/initial-project.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/initial-project.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/initial-project.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/initial-project.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-app-contract.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-app-contract.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-app-contract.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-app-contract.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-application.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-application.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-application.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-application.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-final.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-final.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-final.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-final.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-web.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-web.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/tree-list-web.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/tree-list-web.png diff --git a/docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/wwwroot-lib.png b/docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/wwwroot-lib.png similarity index 100% rename from docs/en/Community-Articles/2020-08-18-DevExtreme-With-ABP/wwwroot-lib.png rename to docs/en/Community-Articles/2020-08-18-Using-DevExtreme-Components-With-The-ABP-Fremework/wwwroot-lib.png From 9c8f7528454f4ef191bf521e58e6c9d23af6309f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 27 Aug 2020 20:50:57 +0300 Subject: [PATCH 18/18] Add options of the generate-proxy command. --- docs/en/CLI.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/en/CLI.md b/docs/en/CLI.md index ff828b91a3..91e7b6669d 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -187,6 +187,13 @@ Usage: abp generate-proxy ```` +#### Options + +* `--module` or `-m`: Specifies the name of the backend module you wish to generate proxies for. Default value: `app`. +* `--source` or `-s`: Specifies the Angular project name to resolve the root namespace & API definition URL from. Default value: `defaultProject`. +* `--target` or `-t`: Specifies the Angular project name to place generated code in. Default value: `defaultProject`. +* `--prompt` or `-p`: Asks the options from the command line prompt (for the unspecified options). + > See the [Angular Service Proxies document](UI/Angular/Service-Proxies.md) for more. @@ -202,7 +209,7 @@ abp switch-to-preview [options] #### Options -`--solution-directory` or `-sd`: Specifies the directory. The solution should be in that directory or in any of its sub directories. If not specified, default is the current directory. +* `--solution-directory` or `-sd`: Specifies the directory. The solution should be in that directory or in any of its sub directories. If not specified, default is the current directory. ### switch-to-nightly @@ -217,7 +224,7 @@ abp switch-to-nightly [options] #### Options -`--solution-directory` or `-sd`: Specifies the directory. The solution should be in that directory or in any of its sub directories. If not specified, default is the current directory. +* `--solution-directory` or `-sd`: Specifies the directory. The solution should be in that directory or in any of its sub directories. If not specified, default is the current directory. ### switch-to-stable @@ -230,7 +237,7 @@ abp switch-to-stable [options] ```` #### Options -`--solution-directory` or `-sd`: Specifies the directory. The solution should be in that directory or in any of its sub directories. If not specified, default is the current directory. +* `--solution-directory` or `-sd`: Specifies the directory. The solution should be in that directory or in any of its sub directories. If not specified, default is the current directory. ### translate